From 05778a3caeb444809e9a6b850a8eb03b050df49b Mon Sep 17 00:00:00 2001 From: Lukas Bestle Date: Sun, 25 Aug 2019 17:10:26 +0200 Subject: [PATCH] Enforce HTTPS in .htaccess --- public/.htaccess | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/.htaccess b/public/.htaccess index cc73b3c..3a8e44c 100644 --- a/public/.htaccess +++ b/public/.htaccess @@ -21,7 +21,12 @@ RewriteEngine on # RewriteBase / -# Rewrite OpenID clients to YADIS file +# enforce HTTPS +RewriteCond %{HTTPS} !=on +RewriteCond %{ENV:HTTPS} !=on +RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L] + +# rewrite OpenID clients to YADIS file RewriteCond %{HTTP_ACCEPT} ^application/xrds\+xml [NC] RewriteRule ^$ /yadis.xml [PT]