Knowledgebase: Miscellaneous
Redirect page using htaccess

Redirect domain.com to www.domain.com

Please insert the following under the .htaccess file

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

Redirect www.domain.com to domain.com

Please insert the following under the .htaccess file

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