mirror of
https://github.com/phanan/htaccess.git
synced 2018-11-08 13:39:40 +01:00
Added redirect flag to force HTTPS when server is behind a reverse proxy
This commit is contained in:
parent
0d0aaf0814
commit
973200d40c
1 changed files with 2 additions and 2 deletions
|
@ -104,8 +104,8 @@ RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
||||||
### Force HTTPS Behind a Proxy
|
### Force HTTPS Behind a Proxy
|
||||||
Useful if you have a proxy in front of your server performing TLS termination.
|
Useful if you have a proxy in front of your server performing TLS termination.
|
||||||
``` apacheconf
|
``` apacheconf
|
||||||
RewriteCond %{HTTP:X-Forwarded-Proto} !https
|
RewriteCond %{HTTP:X-Forwarded-SSL} !on
|
||||||
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
|
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R=301,L]
|
||||||
```
|
```
|
||||||
|
|
||||||
### Force Trailing Slash
|
### Force Trailing Slash
|
||||||
|
|
Loading…
Reference in a new issue