summaryrefslogtreecommitdiffstats
path: root/.htaccess
diff options
context:
space:
mode:
authorMax Kanat-Alexander <mkanat@bugzilla.org>2010-09-19 01:24:06 +0200
committerMax Kanat-Alexander <mkanat@bugzilla.org>2010-09-19 01:24:06 +0200
commit46317c3190e95cca62cd5d932bd6bc4b45e75d23 (patch)
treecf8b01dfc39fb3cc8bd6c43349b97e58f5947052 /.htaccess
parent7df0160f6aaf3adcb3e6ddca0fc172c5ea89eb8c (diff)
downloadbugzilla-46317c3190e95cca62cd5d932bd6bc4b45e75d23.tar.gz
bugzilla-46317c3190e95cca62cd5d932bd6bc4b45e75d23.tar.xz
Bug 586244: Make mod_headers and mod_expires optional
r=glob, a=mkanat
Diffstat (limited to '.htaccess')
-rw-r--r--.htaccess32
1 files changed, 21 insertions, 11 deletions
diff --git a/.htaccess b/.htaccess
index d4436e563..4b06fe9a9 100644
--- a/.htaccess
+++ b/.htaccess
@@ -2,14 +2,24 @@
<FilesMatch ^(.*\.pm|.*\.pl|.*localconfig.*)$>
deny from all
</FilesMatch>
-<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>
+<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>