mirror of
https://github.com/phanan/htaccess.git
synced 2018-11-08 13:39:40 +01:00
adds force http snippet
This commit is contained in:
parent
fff8f8a1e9
commit
e1e303d3f8
@ -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 non-www](#force-non-www)
|
||||||
- [Force HTTPS](#force-https)
|
- [Force HTTPS](#force-https)
|
||||||
- [Force HTTPS Behind a Proxy](#force-https-behind-a-proxy)
|
- [Force HTTPS Behind a Proxy](#force-https-behind-a-proxy)
|
||||||
|
- [Force HTTP](#force-http)
|
||||||
- [Force Trailing Slash](#force-trailing-slash)
|
- [Force Trailing Slash](#force-trailing-slash)
|
||||||
- [Redirect a Single Page](#redirect-a-single-page)
|
- [Redirect a Single Page](#redirect-a-single-page)
|
||||||
- [Redirect an Entire Site](#redirect-an-entire-site)
|
- [Redirect an Entire Site](#redirect-an-entire-site)
|
||||||
@ -78,6 +79,13 @@ RewriteCond %{HTTP:X-Forwarded-Proto} !https
|
|||||||
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
### Force HTTP
|
||||||
|
``` apacheconf
|
||||||
|
RewriteEngine on
|
||||||
|
RewriteCond %{HTTPS} on
|
||||||
|
RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI}
|
||||||
|
```
|
||||||
|
|
||||||
### Force Trailing Slash
|
### Force Trailing Slash
|
||||||
``` apacheconf
|
``` apacheconf
|
||||||
RewriteCond %{REQUEST_URI} /+[^\.]+$
|
RewriteCond %{REQUEST_URI} /+[^\.]+$
|
||||||
|
Loading…
Reference in New Issue
Block a user