Added redirect from HTTP to HTTPS

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
Jim Martens 2018-01-09 16:50:31 +01:00
parent 83a7b7bb77
commit 6d8b44d139
1 changed files with 5 additions and 1 deletions

View File

@ -1,7 +1,11 @@
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteCond %{ENV:HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
# rewrite jim.2martens.de to 2martens.de
RewriteCond %{HTTP_HOST} ^jim\.2martens\.de [NC]
RewriteCond %{SERVER_NAME} ^jim\.2martens\.de [NC]
RewriteRule ^(.*)$ https://2martens.de/$1 [L,R=301]
# custom 404 error page