.htaccess 1.28 KB
Newer Older
1
# Don't allow people to retrieve non-cgi executable files or our private data
2
<FilesMatch (\.pm|\.pl|\.tmpl|localconfig.*)$>
3
  <IfModule mod_version.c>
4
    <IfVersion < 2.4>
5 6
      Deny from all
    </IfVersion>
7
    <IfVersion >= 2.4>
8
      Require all denied
9 10 11 12 13
    </IfVersion>
  </IfModule>
  <IfModule !mod_version.c>
    Deny from all
  </IfModule>
14
</FilesMatch>
15 16 17

Options -Indexes

18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38
<IfModule mod_expires.c>
<IfModule mod_headers.c>
<IfModule mod_env.c>
  <FilesMatch (\.js|\.css)$>
    ExpiresActive On
    # According to RFC 2616, "1 year in the future" means "never expire".
    # We change the name of the file's URL whenever its modification date
    # changes, so browsers can cache any individual JS or CSS URL forever.
    # However, since all JS and CSS URLs involve a ? in them (for the changing
    # name) we have to explicitly set an Expires header or browsers won't
    # *ever* cache them.
    ExpiresDefault "now plus 1 years"
    Header append Cache-Control "public"
  </FilesMatch>

  # This lets Bugzilla know that we are properly sending Cache-Control
  # and Expires headers for CSS and JS files.
  SetEnv BZ_CACHE_CONTROL 1
</IfModule>
</IfModule>
</IfModule>
39 40 41

<IfModule mod_rewrite.c>
  RewriteEngine On
42
  RewriteOptions inherit
43 44
  RewriteRule ^rest/(.*)$ rest.cgi/$1 [NE]
</IfModule>