.htaccess 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. # Version: 8.2.0
  2. <IfModule mod_headers.c>
  3. <IfModule mod_fcgid.c>
  4. <IfModule mod_setenvif.c>
  5. SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
  6. RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
  7. </IfModule>
  8. </IfModule>
  9. <IfModule mod_env.c>
  10. # Add security and privacy related headers
  11. Header set X-Content-Type-Options "nosniff"
  12. Header set X-XSS-Protection "1; mode=block"
  13. Header set X-Robots-Tag "none"
  14. Header set X-Frame-Options "SAMEORIGIN"
  15. SetEnv modHeadersAvailable true
  16. </IfModule>
  17. # Add cache control for CSS and JS files
  18. <FilesMatch "\.(css|js)$">
  19. Header set Cache-Control "max-age=7200, public"
  20. </FilesMatch>
  21. </IfModule>
  22. <IfModule mod_php5.c>
  23. php_value upload_max_filesize 513M
  24. php_value post_max_size 513M
  25. php_value memory_limit 512M
  26. php_value mbstring.func_overload 0
  27. php_value always_populate_raw_post_data -1
  28. php_value default_charset 'UTF-8'
  29. php_value output_buffering off
  30. <IfModule mod_env.c>
  31. SetEnv htaccessWorking true
  32. </IfModule>
  33. </IfModule>
  34. <IfModule mod_rewrite.c>
  35. RewriteEngine on
  36. RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  37. RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
  38. RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
  39. RewriteRule ^\.well-known/carddav /remote.php/carddav/ [R=301,L]
  40. RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R=301,L]
  41. RewriteRule ^apps/calendar/caldav\.php remote.php/caldav/ [QSA,L]
  42. RewriteRule ^apps/contacts/carddav\.php remote.php/carddav/ [QSA,L]
  43. RewriteRule ^remote/(.*) remote.php [QSA,L]
  44. RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  45. RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
  46. </IfModule>
  47. <IfModule mod_mime.c>
  48. AddType image/svg+xml svg svgz
  49. AddEncoding gzip svgz
  50. </IfModule>
  51. <IfModule mod_dir.c>
  52. DirectoryIndex index.php index.html
  53. </IfModule>
  54. AddDefaultCharset utf-8
  55. Options -Indexes
  56. <IfModule pagespeed_module>
  57. ModPagespeed Off
  58. </IfModule>