Reply to Re: [PHP] redirection, same host, two domains

Your name:

Reply:


Posted by Leif Gregory on 03/25/05 23:08

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>

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация