【发布时间】:2016-05-18 15:03:50
【问题描述】:
我有两个域名,但每个域名都指向同一个 IP。如何使用 index.html 文件将每个域重定向到正确的位置?下面是一些伪代码:
if web adddress= http://siteA.com forward too http://siteA.com/siteA_Dir
if web address = http://SiteB.com forward too http://siteB.com/siteB_Dir
else go to localhost:80
我不想使用 htaccess 文件,因为我还没有制作。我目前在我的 index.html 文件中有这段代码:
<meta http-equiv="refresh" content="0; url=http://siteA/SiteA_Dir" />
【问题讨论】: