Created
December 12, 2018 19:57
-
-
Save mmaridev/ffdae7af63448f13c7492b5f4d638fbd to your computer and use it in GitHub Desktop.
Apache Rewrite redirection to https excluding let's encrypt folder
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
<VirtualHost *:80> | |
ServerName you.example.org | |
ServerAlias www.you.example.org | |
DocumentRoot /var/www/html | |
ErrorLog ${APACHE_LOG_DIR}/error_you_sezf_it.log | |
CustomLog ${APACHE_LOG_DIR}/access_you_sezf_it.log combined | |
RewriteEngine On | |
RewriteCond %{HTTPS} off | |
RewriteCond %{REQUEST_URI} !^/?(.well-known)/ | |
RewriteRule ^(.*) https://%{HTTP_HOST}%{REQUEST_URI} | |
</VirtualHost> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment