From 1b95a565b0f9f7150f34effb0c74e348f540bba0 Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa Date: Thu, 25 Jul 2024 16:02:28 -0700 Subject: [PATCH] nextcloud: Redirect to URL nextcloud/ if ending slash is not given Tests: - Without the changes, typing https:///nextcloud does not work. With the changes it redirects to https:///nextcloud/. Signed-off-by: Sunil Mohan Adapa Reviewed-by: James Valleroy --- .../etc/apache2/conf-available/nextcloud-freedombox.conf | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/plinth/modules/nextcloud/data/usr/share/freedombox/etc/apache2/conf-available/nextcloud-freedombox.conf b/plinth/modules/nextcloud/data/usr/share/freedombox/etc/apache2/conf-available/nextcloud-freedombox.conf index 6aa23576c..c9925b897 100644 --- a/plinth/modules/nextcloud/data/usr/share/freedombox/etc/apache2/conf-available/nextcloud-freedombox.conf +++ b/plinth/modules/nextcloud/data/usr/share/freedombox/etc/apache2/conf-available/nextcloud-freedombox.conf @@ -18,6 +18,15 @@ Redirect 301 /.well-known/nodeinfo /nextcloud/index.php/.well-known/nodeinfo Alias /nextcloud/ /var/lib/nextcloud/ +# Redirect /nextcloud to /nextcloud/. + + + RewriteEngine On + RewriteCond %{REQUEST_URI} ^/nextcloud$ + RewriteRule .* /nextcloud/ [R=301,L] + + + ProxyPassMatch "^/nextcloud/(.*\.php(/.*)?)$" "fcgi://localhost:9000/var/www/html/$1"