From e1e303d3f89aa4083733135b1b080bf374b61ac6 Mon Sep 17 00:00:00 2001 From: Mason Wiley Date: Mon, 9 Feb 2015 22:45:43 -0800 Subject: [PATCH] adds force http snippet --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 8b05ff9..e6770c4 100644 --- a/README.md +++ b/README.md @@ -12,6 +12,7 @@ A collection of useful .htaccess snippets, all in one place. I decided to create - [Force non-www](#force-non-www) - [Force HTTPS](#force-https) - [Force HTTPS Behind a Proxy](#force-https-behind-a-proxy) + - [Force HTTP](#force-http) - [Force Trailing Slash](#force-trailing-slash) - [Redirect a Single Page](#redirect-a-single-page) - [Redirect an Entire Site](#redirect-an-entire-site) @@ -78,6 +79,13 @@ RewriteCond %{HTTP:X-Forwarded-Proto} !https RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} ``` +### Force HTTP +``` apacheconf +RewriteEngine on +RewriteCond %{HTTPS} on +RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} +``` + ### Force Trailing Slash ``` apacheconf RewriteCond %{REQUEST_URI} /+[^\.]+$