Created
March 7, 2019 21:11
-
-
Save olkitu/685e9d1569c85ba1008797351d6fdfbf to your computer and use it in GitHub Desktop.
Redirect WordPress site to HTTPS exclude Let's Encrypt Webroot directory
This file contains 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] | |
RewriteCond %{REQUEST_FILENAME} !-f | |
RewriteCond %{REQUEST_FILENAME} !-d | |
RewriteRule . /index.php [L] | |
# End WordPress | |
RewriteCond %{HTTPS} off | |
RewriteCond %{REQUEST_URI} !^/\.well\-known/acme\-challenge/ | |
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment