Redirect http:// to http://www. in htaccess file

by Nirmala 2010-10-05 15:02:07

Redirect http:// to http://www. in htaccess file
Use the below code in your htaccess file
RewriteEngine on
RewriteCond %{http_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]


Now it will redirect http://example.com to http://www.example.com

Tagged in:

1327
like
0
dislike
0
mail
flag

You must LOGIN to add comments