Skip to content

Instantly share code, notes, and snippets.

@nkarpeev
Created August 1, 2018 15:06
Show Gist options
  • Save nkarpeev/8bfed412fd4743324fda13c337c49a6f to your computer and use it in GitHub Desktop.
Save nkarpeev/8bfed412fd4743324fda13c337c49a6f to your computer and use it in GitHub Desktop.
redirect http -> https (modx, beget host)
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^(.*)$ https://domain.ru/$1 [R=301,L]
# Rewrite www.domain.com -> domain.com -- used with SEO Strict URLs plugin
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^domain\.ru [NC]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment