performance - Avoiding Landing Page Redirects with SSL -
performance - Avoiding Landing Page Redirects with SSL -
i did google pagespeed analysis of website , received next message:
avoid landing page redirects
your page has 2 redirects. redirects introduce additional delays before page can loaded.
avoid landing page redirects next chain of redirected urls.
http://example.net/
https://example.net/
https://www.example.net/
is there can (like modifying htaccess file in way), or unavoidable consequence?
here htaccess in case:
rewritecond %{https} off # first rewrite https: # don't set www. here. if there included, if not # subsequent rule grab it. rewriterule ^(.*)$ https://%{http_host}%{request_uri} [l,r=301] # now, rewrite request wrong domain utilize www. rewritecond %{http_host} !^www\. rewriterule ^(.*)$ https://www.%{http_host}%{request_uri} [l,r=301]
you can combine 2 redirects 1 using or
flag
rewritecond %{https} off [or] rewritecond %{http_host} !^www\. [nc] rewritecond %{http_host} ^(www\.)?(.*)$ [nc] rewriterule ^ https://www.%{http_host}%{request_uri} [l,r=301]
performance .htaccess url redirect ssl
Comments
Post a Comment