Your double redirect instructions
-
I am trying to get rid of the Google double redirect messages and warnings (the double redirect is reducing my page load speed by 1.1 seconds it seems). Other speed measuring sites also have this issue as being a significant problem.
In your instruction page:
https://really-simple-ssl.com/knowledge-base/avoid-landing-page-redirects/
You offer two options.
Why does option 1) below not have the <IfModule…> and </IfModule> rows in there like option 2)? Also, which of the below two is more common, or best practice?
1) #redirect non-www to www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]2) #redirect all www requests to non-www.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]
</IfModule>
The topic ‘Your double redirect instructions’ is closed to new replies.