diff options
Diffstat (limited to 'apache2')
| -rw-r--r-- | apache2/conf-available/local-alias-redirect.conf | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/apache2/conf-available/local-alias-redirect.conf b/apache2/conf-available/local-alias-redirect.conf index e04fe29..0437d61 100644 --- a/apache2/conf-available/local-alias-redirect.conf +++ b/apache2/conf-available/local-alias-redirect.conf @@ -1,3 +1,6 @@ -<If "%{HTTP_HOST} != %{SERVER_NAME}"> - RedirectMatch permanent ^(?!/.well-known/acme-challenge/)(.*) https://${_HOST}$1 -</If> + <IfDefine _TLS_HOST> + RedirectMatch permanent ^(?!/.well-known/acme-challenge)(.*) https://${_HOST}$1 + </IfDefine> + <IfDefine !_TLS_HOST> + RedirectMatch permanent ^(?!/.well-known/acme-challenge)(.*) http://${_HOST}$1 + </IfDefine> |
