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

Your name:

Reply:


Posted by Ken on 03/25/05 19:18

On Fri, 25 Mar 2005 11:42:15 -0500, maillists@morningstarcom.net
<maillists@morningstarcom.net> wrote:
> On Friday 25 March 2005 11:36, Alexandru Martin wrote:
> > Okay, here is my problem. I had a site hosted on a sub domain
> > (mysite.domain.com) , now I registered my own domain, mysite.com . The
> > thing is mysite.com is still hosted on mysite.domain.com. What i want to
> > do is : If people type in their browsers mysite.domain.com redirect to
> > mysite.com and if they type mysite.com to display the page.
> > I'm guessing it should be something like this : if ( refferer =
> > mysite.domain.com ) { redirect to mysite.com } else { my html code }
>
> This probably would be better accomplished through apache and DNS
>
> --
> Win a Vespa Scooter or a Dell Gift Card worth $3,000.00
> http://www.morningstarcom.net/raffle-contest.php
>
> --
> This message has been scanned for viruses and
> dangerous content by MailScanner, and is
> believed to be clean.
> MailScanner thanks transtec Computers for their support.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>

If it's running apache stick this in a file named .htaccess and place
it in the web root folder

Redirect 301 / http://www.mysite.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

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