-
-
Save Scordavis/55bb3645a17ef92819993c1f63525c71 to your computer and use it in GitHub Desktop.
www и ssl редиректы для htaccess
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-------С www на не-www------- | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} ^www.sdelaysite\.com$ [NC] | |
RewriteRule ^(.*)$ https://sdelaysite.com/$1 [R=301,L] | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://sdelaysite.com/$1 [R=301,L] | |
-------С не-www на www------- | |
RewriteEngine On | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} ^sdelaysite\.com$ [NC] | |
RewriteRule ^(.*)$ https://www.sdelaysite.com/$1 [R=301,L] | |
RewriteCond %{HTTPS} !=on | |
RewriteRule ^(.*)$ https://www.sdelaysite.com/$1 [R=301,L] | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment