1
0

.htaccess 2.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  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-Download-Options "noopen"
  17. Header set X-Permitted-Cross-Domain-Policies "none"
  18. SetEnv modHeadersAvailable true
  19. </IfModule>
  20. # Add cache control for static resources
  21. <FilesMatch "\.(css|js|svg|gif)$">
  22. Header set Cache-Control "max-age=15778463"
  23. </FilesMatch>
  24. # Let browsers cache WOFF files for a week
  25. <FilesMatch "\.woff$">
  26. Header set Cache-Control "max-age=604800"
  27. </FilesMatch>
  28. </IfModule>
  29. <IfModule mod_php5.c>
  30. php_value upload_max_filesize 511M
  31. php_value post_max_size 511M
  32. php_value memory_limit 512M
  33. php_value mbstring.func_overload 0
  34. php_value always_populate_raw_post_data -1
  35. php_value default_charset 'UTF-8'
  36. php_value output_buffering 0
  37. <IfModule mod_env.c>
  38. SetEnv htaccessWorking true
  39. </IfModule>
  40. </IfModule>
  41. <IfModule mod_php7.c>
  42. php_value upload_max_filesize 511M
  43. php_value post_max_size 511M
  44. php_value memory_limit 512M
  45. php_value mbstring.func_overload 0
  46. php_value default_charset 'UTF-8'
  47. php_value output_buffering 0
  48. <IfModule mod_env.c>
  49. SetEnv htaccessWorking true
  50. </IfModule>
  51. </IfModule>
  52. <IfModule mod_rewrite.c>
  53. RewriteEngine on
  54. RewriteCond %{HTTP_USER_AGENT} DavClnt
  55. RewriteRule ^$ /remote.php/webdav/ [L,R=302]
  56. RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  57. RewriteRule ^\.well-known/host-meta /public.php?service=host-meta [QSA,L]
  58. RewriteRule ^\.well-known/host-meta\.json /public.php?service=host-meta-json [QSA,L]
  59. RewriteRule ^\.well-known/carddav /remote.php/dav/ [R=301,L]
  60. RewriteRule ^\.well-known/caldav /remote.php/dav/ [R=301,L]
  61. RewriteRule ^remote/(.*) remote.php [QSA,L]
  62. RewriteRule ^(?:build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
  63. RewriteCond %{REQUEST_URI} !^/\.well-known/(acme-challenge|pki-validation)/.*
  64. RewriteRule ^(?:\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
  65. </IfModule>
  66. <IfModule mod_mime.c>
  67. AddType image/svg+xml svg svgz
  68. AddEncoding gzip svgz
  69. </IfModule>
  70. <IfModule mod_dir.c>
  71. DirectoryIndex index.php index.html
  72. </IfModule>
  73. AddDefaultCharset utf-8
  74. Options -Indexes
  75. <IfModule pagespeed_module>
  76. ModPagespeed Off
  77. </IfModule>