View Single Post
Old 12-07-2005, 05:47 PM  
Machete_
WINNING!
 
Industry Role:
Join Date: Oct 2002
Posts: 14,579
2. If you need to redirect http://mysite.com to
http://www.mysite.com and you've got mod_rewrite enabled on
your server you can put this in your .htaccess file:

Options +FollowSymLinks
RewriteEngine on
RewriteBase /
RewriteRule ^(.*).htm$ $1.html [R=301,L]

or this:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

Tip: Use your full URL (ie http://www.domain.com) when
obtaining incoming links to your site. Also use your full
URL for the internal linking of your site.


http://www.isitebuild.com/301-redirect.htm
Machete_ is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote