My domainname is now set to domain.com and I need to have it point to www.domain.com I have a hostgator account and modrewrite enabled. I just can't figur out how to set it, I always get an error.
if you are using wordpress you can setup the url under General Settings. htaccess will not work if you force it using htaccess
If you want it done via .htaccess this will do, Options +FollowSymlinks RewriteEngine on rewritecond %{HTTP_HOST} ^domain.com [nc] rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc] Code (markup):