Pages

Thursday, April 25, 2013

You can use mod_rewrite for redirecting http to https.

You can use mod_rewrite for redirecting http to https.
You need to go in the http vhost container and add the following:

========================================

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
Or else, you can add the following lines

RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^.*$ https://%{SERVER_NAME}%{REQUEST_URI} [L,R]

No comments:

Post a Comment