From 54f59c1069acf2bec3205458c6f886dd08ffdc17 Mon Sep 17 00:00:00 2001 From: Johan Bernhardsson Date: Sat, 25 May 2024 19:26:09 +0200 Subject: [PATCH] Use a better rewrite in apache ssl config (#2641) --- lets-encrypt/activate-tls.sh | 2 +- nextcloud_install_production.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lets-encrypt/activate-tls.sh b/lets-encrypt/activate-tls.sh index c535a19752..2317de5108 100644 --- a/lets-encrypt/activate-tls.sh +++ b/lets-encrypt/activate-tls.sh @@ -137,7 +137,7 @@ then cat << TLS_CREATE > "$tls_conf" RewriteEngine On - RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L] + RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [END,NE,R=permanent] diff --git a/nextcloud_install_production.sh b/nextcloud_install_production.sh index 461fbfe76d..58297cd561 100644 --- a/nextcloud_install_production.sh +++ b/nextcloud_install_production.sh @@ -830,7 +830,7 @@ then cat << TLS_CREATE > "$SITES_AVAILABLE/$TLS_CONF" # # RewriteEngine On -# RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [R=301,L] +# RewriteRule ^(.*)$ https://%{HTTP_HOST}$1 [END,NE,R=permanent] #