I was trying to do a 301 Redirect of my domain.com to http://www.domain.com to make it SEO friendly... However i got following error - *********** Not Found The requested URL /public_html/ was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. ********** >htaccess content----- Please suggest RewriteEngine On Options +FollowSymLinks RewriteCond %{HTTP_HOST} !^www.pricenext.in [NC] RewriteRule ^(.*)$ http://www.pricenext.in/$1 [L,R=301] Code (markup):
Try the following RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] Code (markup):
I always used this code format: RewriteEngine On RewriteCond %{HTTP_HOST} ^yourdomain.com RewriteRule (.*) http://www.yourdomain.com/$1 [R=301,L] Code (markup): - Dynashox -