What's going on in Mesiols work day

Showing posts with label apache2 redirect http to https. Show all posts
Showing posts with label apache2 redirect http to https. Show all posts

Thursday, February 26, 2009

rewrite all http to https in Apache

Hi,

i had to do some web server configuration. Requirement was, that all http traffic should be redirected to https on the server.

I used mod_rewrite to do the job with the following configuration statement


RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Don't forget to configure SSL on the server :)

Followers