Created
March 4, 2016 08:42
-
-
Save monodot/56fdf1c2545b780cd0e9 to your computer and use it in GitHub Desktop.
Redirect from HTTP to HTTPS using rewrite rules
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 | |
# Redirect from HTTP to HTTPS, by inspecting the HTTP port | |
RewriteCond %{SERVER_PORT} 80 | |
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment