Created
May 4, 2018 09:07
-
-
Save wmgodyak/b4a11a03c126af9a2088ecd33ab66d2c to your computer and use it in GitHub Desktop.
redirect from http to https custom domain in wordpress multisite example
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
RewriteEngine On | |
RewriteBase / | |
RewriteRule ^index\.php$ - [L] | |
# add a trailing slash to /wp-admin | |
RewriteRule ^wp-admin$ wp-admin/ [R=301,L] | |
RewriteCond %{HTTPS} !=on | |
RewriteCond %{HTTP_HOST} ^publikom\.se$ [OR] | |
RewriteCond %{HTTP_HOST} ^www\.publikom\.se$ | |
RewriteRule ^/?$ "https\:\/\/publikom\.se\/" [R=301,L] | |
RewriteCond %{REQUEST_FILENAME} -f | |
RewriteCond %{REQUEST_FILENAME} -d | |
RewriteRule ^ - [L] | |
RewriteRule ^(wp-(content|admin|includes).*) $1 [L] | |
RewriteRule ^(.*\.php)$ $1 [L] | |
RewriteRule . index.php [L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment