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]