Puddinq.com sharing knowledge

One stop redirect https and www

One stop redirect https and www

If you want a redirect to the www version and a redirect to the https version of your blog, you might add rules to redirect those situations. On any pageload test this kan be punished if it detects tworedirect (both to www and https). To be save time and score, do both redirects in one swift move.

RewriteEngine on
RewriteCond %{HTTPS} off [OR]
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule (.*) https://www.example.com%{REQUEST_URI} [R=301,L]