Created
July 31, 2019 21:35
-
-
Save corysolovewicz/86f8693220828312d061e145cf95df64 to your computer and use it in GitHub Desktop.
Conditional SSL using mod_rewrite in Apache
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
# http://phpstarter.net/2008/07/several-htaccess-mod_rewrite-tricks-to-better-web-application/ | |
# any access to "secure" directory is redirected to HTTPS | |
RewriteCond %{HTTPS} off | |
RewriteRule ^secure/.*$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment