Force www with .htaccess

Sometimes it is useful to force www in Joomla, especially when using Joomla + VirtueMart estore to avoid double login issues. 

Insert these lines in your .htaccess file that resides in your websites root. 

RewriteCond %{HTTP_HOST} !^$ 

RewriteCond %{HTTP_HOST} !^www\. [NC] 

RewriteCond %{HTTPS}s ^on(s)| 

RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

 

Liked this tutorial? 

Check out Like Lock

Post Author: Tom Pai