Monthly Archives: June 2019

How to redirect non www or non https url to www and https

This is very common problem to everyone to redirect non www urls to www with https. You can follow simple .htaccess rules to implement it. RewriteEngine On RewriteCond %{HTTP_HOST} !^www\. [NC] RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301] RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://www.example.com/$1 [L,R=301] The only real difference here is that first we redirect from non-WWW to… Read More »