Created
January 21, 2020 01:42
-
-
Save modemlooper/7ad04d9f5b874bdaa9d443ac1a84a45f to your computer and use it in GitHub Desktop.
runcloud redirect htaccess
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 | |
# If we receive a forwarded http request from a proxy... | |
RewriteCond %{HTTP:X-Forwarded-Proto} =http [OR] | |
# ...or just a plain old http request directly from the client | |
RewriteCond %{HTTP:X-Forwarded-Proto} ="" | |
RewriteCond %{HTTPS} !=on | |
# Redirect to https version | |
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