Pages

Htaccess code to redirect from http to www

Add following code on your htaccess file to redirect http://yourdomain.com to http://www.yourdomain.com. Just change your domain name there, no other changes are required.

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

No comments:

Post a Comment