diff options
Diffstat (limited to '.htaccess')
-rw-r--r-- | .htaccess | 25 |
1 files changed, 22 insertions, 3 deletions
diff --git a/.htaccess b/.htaccess index b68adb43412..725efa0971a 100644 --- a/.htaccess +++ b/.htaccess @@ -1,4 +1,3 @@ -# Version: 9.0.0 <IfModule mod_headers.c> <IfModule mod_setenvif.c> <IfModule mod_fcgid.c> @@ -16,6 +15,8 @@ Header set X-XSS-Protection "1; mode=block" Header set X-Robots-Tag "none" Header set X-Frame-Options "SAMEORIGIN" + Header set X-Download-Options "noopen" + Header set X-Permitted-Cross-Domain-Policies "none" SetEnv modHeadersAvailable true </IfModule> @@ -41,11 +42,29 @@ RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}] RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L] RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L] - RewriteRule ^\.well-known/carddav /remote.php/carddav/ [R=301,L] - RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R=301,L] + RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L] + 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/.* RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L] + + # Rewrite rules for `front_controller_active` + Options -MultiViews + RewriteRule ^core/js/oc.js$ index.php/core/js/oc.js [PT,E=PATH_INFO:$1] + RewriteRule ^core/preview.png$ index.php/core/preview.png [PT,E=PATH_INFO:$1] + RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff|ico)$ + RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$ + RewriteCond %{REQUEST_FILENAME} !/remote.php + RewriteCond %{REQUEST_FILENAME} !/public.php + RewriteCond %{REQUEST_FILENAME} !/cron.php + RewriteCond %{REQUEST_FILENAME} !/core/ajax/update.php + RewriteCond %{REQUEST_FILENAME} !/status.php + RewriteCond %{REQUEST_FILENAME} !/ocs/v1.php + RewriteCond %{REQUEST_FILENAME} !/ocs/v2.php + RewriteCond %{REQUEST_FILENAME} !/updater/ + RewriteCond %{REQUEST_URI} !^/.well-known/acme-challenge/.* + RewriteRule .* index.php [PT,E=PATH_INFO:$1] </IfModule> <IfModule mod_mime.c> AddType image/svg+xml svg svgz |