Thursday, October 4, 2012

Redirecting non-www to www with .htaccess


RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Simply  create a file .htaccess   and save this code in the file   .htaccess  after that add the file in your site root directory       Thanks 

1 comment: