Created
January 29, 2010 21:20
-
-
Save ashchristopher/290150 to your computer and use it in GitHub Desktop.
Dealing with Http/Https issues.
This file contains hidden or 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
# if we are using port 443 and the url doesnt contain onlinebooking or media-server then redirect to http. | |
RewriteCond %{SERVER_PORT} ^443$ | |
RewriteCond %{REQUEST_URI} !(onlinebooking) | |
RewriteCond %{REQUEST_URI} !(media-server) | |
RewriteRule ^(.*)$ http://test.gapadventures.com$1 [R=301,L] | |
# if not using port 443 and url contains onlinebooking, redirect to https | |
# Redirect to HTTPS server. | |
RewriteCond %{SERVER_PORT} !^443$ | |
RewriteCond %{REQUEST_URI} (onlinebooking) | |
RewriteRule ^(.*)$ https://test.gapadventures.com$1 [R,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment