How to , and other stuff about linux, photo, php … Another blog just like others on internet

July 14, 2020

redirect to https

Filed under: Linux — Tags: , , , , — admin @ 12:33 pm

I have two version of redirect

RewriteEngine On
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.matrafox.info/$1 [R,L]

Other version is

#non-www. http to www. https
RewriteCond %{ENV:HTTPS} !on
RewriteCond %{HTTP_HOST} ^(www.)?matrafox.info$
RewriteRule (.*) https://www.matrafox.info/$1 [R=301,L]

#non-www. https to www. https
RewriteCond %{ENV:HTTPS} on
RewriteCond %{HTTP_HOST} ^matrafox.info$
RewriteRule (.*) https://www.matrafox.info/$1 [R=301,L]

Powered by WordPress