Re: Multiple URL Redirection
| From: | Steve Buehler | Date: | Sun, 06 Jun 2004 01:21:46 +0000 |
| Subject: | Re: Multiple URL Redirection | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-187720@lists.php.net to get a copy of this message | ||
At 06:39 PM 6/5/2004, you wrote:
Hi I have the following situation: I've got a domain that is hosted at a certain host. This host allows me to create subdomains, and also to add several domains to the same account. The thing is if I add a domain like xxx.com to my yyy.com both will be directed to my index.php page. I want to know if there is a way to recognize if the user typed to the url xxx.om or yyy.com and then send it to a certain folder. I thank any word of wisdom from you guys. RodrigoTry: if($_SERVER["HTTP_HOST"]=="xxx.com"){
header("Location: http://www.xxx.com/xxxdir");
}elseif($_SERVER["HTTP_HOST"]=="yyy.com"){
header("Location: http://www.yyy.com/yyydir");
}else{
echo "Huh?"; }