Sunday, May 31, 2009

Permanent Redirect 301

Ok I have spent a lots of time finding this...
If you are using a Linux server with the Apache Mod-Rewrite module enabled then you can mod your .htaccess file.
THIS IS CODE IN BLUE

RewriteEngine on
rewritecond %{http_host} ^mypage.com [nc]

rewriterule ^(.*)$ http://www.mypage.com/$1 [r=301,nc]


Change mypage to your page name.
So you are asking your self why do I need this:
Search engines think of this mypage.com and www.mypage.com as two different pages unless you setup this redirect.
So set it up for search engine friendly page.
Any questions just post them in comment....

THIS ONLY WORKS WITH LINUX SERVER RUNNING APACHE

No comments:

Post a Comment