.htaccess 1.97 KB
Newer Older
Lukas Reschke's avatar
Lukas Reschke committed
1
# Version: 8.1.0
2
<IfModule mod_headers.c>
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
  <IfModule mod_fcgid.c>
    <IfModule mod_setenvif.c>
       SetEnvIfNoCase ^Authorization$ "(.+)" XAUTHORIZATION=$1
       RequestHeader set XAuthorization %{XAUTHORIZATION}e env=XAUTHORIZATION
    </IfModule>
  </IfModule>

  <IfModule mod_env.c>
    # Add security and privacy related headers
    Header set X-Content-Type-Options "nosniff"
    Header set X-XSS-Protection "1; mode=block"
    Header set X-Robots-Tag "none"
    Header set X-Frame-Options "SAMEORIGIN"
    SetEnv modHeadersAvailable true
  </IfModule>

  # Add cache control for CSS and JS files
  <FilesMatch "\.(css|js)$">
    Header set Cache-Control "max-age=7200, public"
  </FilesMatch>
23
</IfModule>
24
<IfModule mod_php5.c>
Robin Appelman's avatar
Robin Appelman committed
25
26
php_value upload_max_filesize 513M
php_value post_max_size 513M
27
php_value memory_limit 512M
28
php_value mbstring.func_overload 0
29
php_value always_populate_raw_post_data -1
30
php_value default_charset 'UTF-8'
31
php_value output_buffering off
Lukas Reschke's avatar
Lukas Reschke committed
32
<IfModule mod_env.c>
Stefan Göckeritz's avatar
Stefan Göckeritz committed
33
34
  SetEnv htaccessWorking true
</IfModule>
35
</IfModule>
36
<IfModule mod_rewrite.c>
37
RewriteEngine on
38
RewriteRule .* - [env=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
39
40
41
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]
Felix Eckhofer's avatar
Felix Eckhofer committed
42
RewriteRule ^\.well-known/caldav /remote.php/caldav/ [R]
43
44
RewriteRule ^apps/calendar/caldav\.php remote.php/caldav/ [QSA,L]
RewriteRule ^apps/contacts/carddav\.php remote.php/carddav/ [QSA,L]
45
RewriteRule ^remote/(.*) remote.php [QSA,L]
46
RewriteRule ^(build|tests|config|lib|3rdparty|templates)/.* - [R=404,L]
47
RewriteRule ^(\.|autotest|occ|issue|indie|db_|console).* - [R=404,L]
48
</IfModule>
49
50
51
52
<IfModule mod_mime.c>
AddType image/svg+xml svg svgz
AddEncoding gzip svgz
</IfModule>
Lukas Reschke's avatar
Lukas Reschke committed
53
<IfModule mod_dir.c>
54
55
DirectoryIndex index.php index.html
</IfModule>
56
AddDefaultCharset utf-8
57
Options -Indexes
Thomas Müller's avatar
Thomas Müller committed
58
<IfModule pagespeed_module>
59
  ModPagespeed Off
60
</IfModule>