I want my website to appear as "www.domain.com" instead of "domain.com", whatever the user inputs to browser. I tried this through .htaccess file with following code
Redirect / http://www.domain.com
Unfortunately this ceased to display my website.
Try this
RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
http://www.neohide.com/htaccess-mod-rewrite-for-www-domain-name-prefix
I have already used this script lines. And yes it's working perfectly but one thing I should mention is the site got slow down. Is there anything can be done for improving the site load time..