Apache – Redirect from http to https.
- March 19th, 2010
- Posted in Documentation
- Write comment
I used the following rewrite rules to redirect squirrelmail from http to https automatically. I added this to the end of the /etc/httpd/conf.d/squirrelmail.conf in RHEL5.x.
vi /etc/httpd/conf.d/squirrelmail.conf
…
RewriteEngine On
RewriteCond %{SERVER_PORT} !^443$
RewriteRule ^/(.*) https://%{SERVER_NAME}/$1 [L,R]
This works as well.