Re: redirection, same host, two domains

From: Date: Fri, 25 Mar 2005 21:08:08 +0000
Subject: Re: redirection, same host, two domains
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-211598@lists.php.net to get a copy of this message
Hello Alexandru, Friday, March 25, 2005, 9:36:12 AM, you wrote: AM> Okay, here is my problem. I had a site hosted on a sub domain AM> (mysite.domain.com) , now I registered my own domain, mysite.com . AM> The thing is mysite.com is still hosted on mysite.domain.com. What AM> i want to do is : If people type in their browsers AM> mysite.domain.com redirect to mysite.com and if they type AM> mysite.com to display the page. I'm guessing it should be AM> something like this : if ( refferer = mysite.domain.com ) { AM> redirect to mysite.com } else { my html code } http://www.devtek.org/snippets/index.php#domainRedirection The only difference in your case is you don't need the second check, and you'll just place your mysite.com HTML below the PHP. Cheers, Leif Gregory -- TB Lists Moderator (and fellow registered end-user) PCWize Editor / ICQ 216395 / PGP Key ID 0x7CD4926F Web Site <http://www.PCWize.com>

« previous php.general (#211598) next »