Last active
August 29, 2015 14:02
-
-
Save yzguy/c6bb3e9ced54ae50f03e to your computer and use it in GitHub Desktop.
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
| <VirtualHost *:80> | |
| RewriteEngine on | |
| ReWriteCond %{SERVER_PORT} !^443$ | |
| RewriteRule ^/(.*) https://%{HTTP_HOST}/$1 [NC,R,L] | |
| </VirtualHost> | |
| HTTP to HTTPS redirect in apache, requires mod_ssl and mod_rewrite | |
| Goes in httpd.conf (CentOS, RHEL) or sites-enabled/{site} file |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment