Hi

I want to add the following to my .htaccess file so that it throws a 301 if http://domain.com is entered and diverts to http://www.domain.com

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

This works fine. However, the problem is that once this is in place, I am unable to login. Drupal just rejects my password. Is there any way to get this to work.

Thanks

Comments

houndbee’s picture

Edit the $base_url value in your sites/default/settings.php to 'www.domain.com' instead of 'domain.com'

Kaustubh Srikanth
http://www.livejournal.com/users/kaustubhhere