.htaccess - How do I make sure my site always has the https infront -
hey guys have following .htaccess code:
rewriteengine on rewritecond %{http_host} !^www.site.com$ [nc] rewriterule ^(.*)$ https://www.site.com/$1 [l,r=301] this make sure ssl showing, reason on google if search site , click on subcatagorys, services. takes site's services , displays without https, becomes www.....
how fix this?
david
the rewritecond you're using preventing urls www (eg http:// www.site.com/page.html) being redirected
rewriteengine on rewritecond %{https} off rewriterule ^(.*)$ https://www.site.com%{request_uri} [r=301,l]
Comments
Post a Comment