How to redirect HTTP to HTTPS in Apache with mod_rewrite?
Posted on In QAI’d like to force using of https on one of my site. How to redirect HTTP to HTTPS in Apache with mod_rewrite?
You can put these lines to the .htaccess file in the directory from which you would like to redirect HTTPS to HTTP:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}