diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2021-06-16 19:35:29 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 19:35:29 +0200 |
commit | f8add9d82fb13c6e188ee9c5460fd33d8770b8ad (patch) | |
tree | 7b5e1b0e7fa2bf1c79c3a1c092c637e106314809 /lib/private/Setup.php | |
parent | c04e0d1db9b7d6e0afb4c60ecc0151f6c24082bf (diff) | |
parent | f78420702c693a3d37c23cdc5bdf06e9e761b84c (diff) | |
download | nextcloud-server-f8add9d82fb13c6e188ee9c5460fd33d8770b8ad.tar.gz nextcloud-server-f8add9d82fb13c6e188ee9c5460fd33d8770b8ad.zip |
Merge pull request #22628 from Sp1l/simplify-htaccess-rewrites
Coalesce RewriteCond lines in .htaccess
Diffstat (limited to 'lib/private/Setup.php')
-rw-r--r-- | lib/private/Setup.php | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 5234be0bf3e..8e7e6ae6aea 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -525,19 +525,12 @@ class Setup { $content .= "\n RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]"; $content .= "\n RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !\\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4|mp3|ogg|wav)$"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !core/img/manifest.json$"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/remote.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/public.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/cron.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/status.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/robots.txt"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/updater/"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs-provider/"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocm-provider/"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/core/ajax/update\\.php"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/core/img/(favicon\\.ico|manifest\\.json)$"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/(cron|public|remote|status)\\.php"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/ocs/v(1|2)\\.php"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/robots\\.txt"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !/(ocm-provider|ocs-provider|updater)/"; $content .= "\n RewriteCond %{REQUEST_URI} !^/\\.well-known/(acme-challenge|pki-validation)/.*"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !/richdocumentscode(_arm64)?/proxy.php$"; $content .= "\n RewriteRule . index.php [PT,E=PATH_INFO:$1]"; |