编辑主机文件以将www.somesite.com重定向到localhost / somesite

时间:2013-03-19 12:24:21

标签: redirect localhost host

我开发了多个站点,因此我为每个站点都有一个文件夹,例如。 localhost / firstsite为www.firstsite.com localhost / secondesite for www.secondsite.com

当我输入例如。

的webaddress时,我希望主机文件重定向到特定文件夹

当我输入www.firstsite.com时,它应该转到localhost / firstsite。

1 个答案:

答案 0 :(得分:0)

尝试如下......它会帮助你......

转到IIS管理器 inetmgr

添加新网站

enter image description here

创建如下网站:

enter image description here

创建第二个网站,如下所示:

enter image description here

现在www.firstsite.com将重定向到localhost/firstsitewww.secondsite.com将重定向到localhost/secondesite