Reputation: 13608
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 web 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 :-)
Upvotes: 0
Views: 108
Reputation: 23552
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
Upvotes: 1