diff --git a/.htaccess b/.htaccess index ad70bd850f50..ac788e1379d2 100644 --- a/.htaccess +++ b/.htaccess @@ -69,7 +69,7 @@ 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/.* + RewriteCond %{REQUEST_URI} !^/.well-known/(acme-challenge|pki-validation)/.* RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L] diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 76bbe6b1a886..6d73509c6d3e 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -448,7 +448,7 @@ public static function updateHtaccess() { $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !/updater/"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs-provider/"; - $content .= "\n RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.*"; + $content .= "\n RewriteCond %{REQUEST_URI} !^/.well-known/(acme-challenge|pki-validation)/.*"; $content .= "\n RewriteRule . index.php [PT,E=PATH_INFO:$1]"; $content .= "\n RewriteBase " . $rewriteBase; $content .= "\n ";