Skip to content

Instantly share code, notes, and snippets.

@medzhidov
Created October 25, 2018 13:51
Show Gist options
  • Save medzhidov/2d41095974c30bd6476b976a13214b16 to your computer and use it in GitHub Desktop.
Save medzhidov/2d41095974c30bd6476b976a13214b16 to your computer and use it in GitHub Desktop.
Https to http and www to non-www redirects for bitrix
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{HTTPS} !=on
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment