当前位置:网站首页>域名重定向工具 —— SwitchHosts 实用教程
域名重定向工具 —— SwitchHosts 实用教程
2022-08-01 22:18:00 【朝阳39】
下载安装
方式一:官网下载
在下载页中,找到对应操作系统的合适版本
方式二:网盘下载
版本为:SwitchHosts_windows_installer_x64_4.1.2.6086.exe
链接:https://pan.baidu.com/s/16izLHTlqwnIV3Bawxainzw?pwd=31e5
安装
双击打开安装包,一直下一步即可。
使用
双击打开安装好的桌面快捷方式
默认能看到系统hosts,为只读状态,无法修改。
我们新建一个自己的 host
自定义名称为 test 后确定
添加内容为
127.0.0.1 cc.com
即具体IP对应的域名
功能为:当访问 cc.com 时,就会重定向到访问IP 127.0.0.1
最后启动 host
检测效果
- 在桌面上新建文件夹 test
- 用vscode打开文件夹 test
- 在文件夹 test内新建文件 index.html 内容为
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Document</title>
</head>
<body>
<h1>你好</h1>
</body>
</html>
- 点右下角的 Go Live 启动本地服务
若无此按钮,则需先安装插件 Live Server
启动后,浏览器会自动打开
http://127.0.0.1:5500/index.html
- 用 cc.com 替换掉 127.0.0.1
浏览器访问 http://cc.com:5500/index.html
浏览器提示域名进行了重定向
,并且页面内容与 http://127.0.0.1:5500/index.html 相同,即说明 host 配置成功!
边栏推荐
- xctf attack and defense world web master advanced area webshell
- leetcode 204. Count Primes 计数质数 (Easy)
- PAM 回文自动机
- SAP ABAP OData 服务如何支持删除(Delete)操作试读版
- PHP算法之最接近的三数之和
- leetcode 204. Count Primes 计数质数 (Easy)
- 漫长的投资生涯
- [机缘参悟-58]:《素书》-5-奉行仁义[遵义章第五]
- 三、mysql 存储引擎-建库建表操作
- Raspberry Pi information display small screen, display time, IP address, CPU information, memory information (C language), four-wire i2c communication, 0.96-inch oled screen
猜你喜欢
xctf攻防世界 Web高手进阶区 webshell
(翻译)按钮的对比色引导用户操作的方式
小程序容器+自定义插件,可实现混合App快速开发
Centos7--MySQL的安装
复现gallerycms字符长度限制短域名绕过
Deep Learning Course2 Week 2 Optimization Algorithms Exercises
Wechat Gymnasium Appointment Mini Program Graduation Design Finished Work (4) Opening Report
xctf attack and defense world web master advanced area web2
如何防范 DAO 中的治理攻击?
Advanced Algebra_Proof_The algebraic multiplicity of any eigenvalue of a matrix is greater than or equal to its geometric multiplicity
随机推荐
ARFoundation Getting Started Tutorial U2-AR Scene Screenshot Screenshot
03. GO language variable definition, function
leetcode 204. Count Primes 计数质数 (Easy)
如何理解 new (...args: any[]) => any
Small application project works WeChat stadium booking applet graduation design of the finished product (1) the development profile
第3讲:MySQL数据库中常见的几种表字段数据类型
小程序毕设作品之微信体育馆预约小程序毕业设计成品(2)小程序功能
线程池分析
13、学习MySQL 分组
Deep learning Course2 first week Practical aspects of Deep Learning exercises
感觉自己好傻
String - Trie
kubernetes CoreDNS全解析
Kubernetes Scheduler全解析
[Niu Ke brush questions-SQL big factory interview questions] NO4. Travel scene (a taxi)
高等代数_证明_矩阵的行列式为特征值之积, 矩阵的迹为特征值之和
2022年最新河北建筑八大员(机械员)模拟考试题库及答案
小程序中的多表联合查询
JS prototype hasOwnProperty in Add method Prototype end point Inherit Override parent class method
46.全排列