Re: redirection, same host, two domains

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux