mirror of
https://github.com/phanan/htaccess.git
synced 2018-11-08 13:39:40 +01:00
Made some amends for #48
This commit is contained in:
parent
d34ec0cde0
commit
7b8da8b3f3
1 changed files with 10 additions and 1 deletions
11
README.md
11
README.md
|
@ -89,7 +89,16 @@ RewriteRule ^ %1%3%{REQUEST_URI} [R=301,L]
|
||||||
|
|
||||||
### Force HTTPS
|
### Force HTTPS
|
||||||
``` apacheconf
|
``` apacheconf
|
||||||
Header always set Strict-Transport-Security "max-age=604800; includeSubDomains"
|
RewriteEngine on
|
||||||
|
RewriteCond %{HTTPS} !on
|
||||||
|
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
||||||
|
|
||||||
|
# Note: It's also recommended to enable HTTP Strict Transport Security (HSTS)
|
||||||
|
# on your HTTPS website to help prevent man-in-the-middle attacks.
|
||||||
|
# See https://developer.mozilla.org/en-US/docs/Web/Security/HTTP_strict_transport_security
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains"
|
||||||
|
</IfModule>
|
||||||
```
|
```
|
||||||
|
|
||||||
### Force HTTPS Behind a Proxy
|
### Force HTTPS Behind a Proxy
|
||||||
|
|
Loading…
Reference in a new issue