开发者

Can i direct user to a specific folder depending on

Can i direct user to a specific folder depending on what domain they requested?

I have several domains at no-ip.org, lets say NAME1.no-ip.org and NAME2.no-ip.org. In my default 开发者_如何学Pythonweb folder i have two sub folders, one of each of the domains. Could I in any way redirect them to the correct folder depending on what domain they are trying to browse?

If it matters i have set up ISS7 with PHP :-)


if ($_SERVER['HTTP_HOST'] == "NAME1.no-ip.org") 
  header("Location: /right/folder");

BTW Look also how to deal with virtualhost and IIS7. Usually this kinds of redirection are made by the webserver itself if well configured

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜