.htaccess 2.5 KB

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