Use a better rewrite in apache ssl config (#2641)

This commit is contained in:
Johan Bernhardsson 2024-05-25 19:26:09 +02:00 committed by GitHub
parent b40963207d
commit 54f59c1069
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 2 additions and 2 deletions

View File

@ -137,7 +137,7 @@ then
cat << TLS_CREATE > "$tls_conf"
<VirtualHost *:80>
RewriteEngine On
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [END,NE,R=permanent]
</VirtualHost>
<VirtualHost *:443>

View File

@ -830,7 +830,7 @@ then
cat << TLS_CREATE > "$SITES_AVAILABLE/$TLS_CONF"
# <VirtualHost *:80>
# RewriteEngine On
# RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L]
# RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [END,NE,R=permanent]
# </VirtualHost>
<VirtualHost *:443>