I am looking to redirect my users from example.com to www.example.com. When most of my members who are logged in visit example.com they are not logged in properly till they click a link like www.example.com/node . This way I can keep count of my logged in users easily.

I read about htaccess redirect 303 but didnt manage to figure out how to implement this exactly in drupal's htaccess

thanks in advance.

Comments

Lam0r’s picture

kick ^^

frjo’s picture

After "RewriteEngine on" you add this.

# Add www
RewriteCond %{HTTP_HOST} ^example\.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=permanent,L]
Lam0r’s picture

I just didnt know where to put this code. Thanks a lot frjo. Now I can go sleep with peace of mind :D. :x