diff --git a/.htaccess b/.htaccess index 8f13d0509754f..768a683708af4 100644 --- a/.htaccess +++ b/.htaccess @@ -65,7 +65,10 @@ RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L] RewriteRule ^remote/(.*) remote.php [QSA,L] RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L] - RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/.* + RewriteCond %{REQUEST_URI} ^/\.well-known/.* + RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/?.* + RewriteRule ^\.well-known/.* /index.php [QSA,L] + RewriteCond %{REQUEST_URI} !^/\.well-known/.* RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]