apache:redirect-http-to-https

This is an old revision of the document!


How to redirect HTTP traffic to HTTPS using an .htaccess file

The below code when added to an .htaccess file will automatically redirect any traffic destined for http: to https:

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

apache/redirect-http-to-https.1407287486.txt.gz · Last modified: by shaun.reitan

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki