Friday, 11 July 2014

How to redirect www traffic to non-www url in Joomla when using SSL certificates

If you just want to direct www traffic to you non-www URL then use this guide to edit your .htaccess file.

But if like me you want to add an SSL certificate to your site you will find that the following will happen: will got to will go to will go to will go to (we want this to go to https, not http)

To do this we use the following instruction:

 RewriteEngine On   
 RewriteCond %{HTTP_HOST} !^mysite\.com   
 RewriteCond %{HTTPS}s on(s)|   
 RewriteRule (.*) http%1://$1 [R=301,L]  

No comments:

Post a Comment