Home Web Development Redirect to www using htaccess redirect
Redirect to www using htaccess redirect PDF Print E-mail
Written by Administrator   

To set all requests coming in to get redirected to follow the below instructions. httt[://www. redirects are essential for good SEO of the website.

Create a .htaccess file with the below code. The .htaccess file needs to be placed in the root directory of your old website (i.e the same directory where your index file is placed)


Options +FollowSymlinks

RewriteEngine on

rewritecond %{http_host} ^ [nc]

rewriterule ^(.*)$$1 [r=301,nc]

You need to replace the: and with your actual domain name.  Note* This .htaccess method of redirection works ONLY on Linux servers having the Apache Mod-Rewrite moduled enabled.