Redirect from HTTP to HTTPS with Apache Rewrite Rules

Valic —  November 30, 2010 — 1 Comment

Just put this in your ..htaccess file.

// .htaccess HTTP to HTTPS Rewrite Rule
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

Valic

Posts Twitter Facebook

Editor in Chief at Debian-Tutorials, Linux enthusiast.

One response to Redirect from HTTP to HTTPS with Apache Rewrite Rules

  1. cosmetic surgery January 10, 2011 at 16:12

    Wow this is a great resource.. I’m enjoying it.. good article

Leave a Reply