aboutsummaryrefslogtreecommitdiffstats
path: root/railties/guides/source/asset_pipeline.textile
diff options
context:
space:
mode:
authorMarcus Ilgner <mail@marcusilgner.com>2011-09-06 16:27:26 +0200
committerMarcus Ilgner <mail@marcusilgner.com>2011-09-06 16:27:26 +0200
commit5e2bf4de62014820798b271e97fa010ddc1a7e02 (patch)
tree9a51edd646167d891158bb654f5d8e3f37e70607 /railties/guides/source/asset_pipeline.textile
parent9584e15d3967a9fd4b38dca26db2de68add96dd2 (diff)
downloadrails-5e2bf4de62014820798b271e97fa010ddc1a7e02.tar.gz
rails-5e2bf4de62014820798b271e97fa010ddc1a7e02.tar.bz2
rails-5e2bf4de62014820798b271e97fa010ddc1a7e02.zip
Fixed Apache configuration for gzipped assets: FilesMatch and LocationMatch cannot be nested.
Diffstat (limited to 'railties/guides/source/asset_pipeline.textile')
-rw-r--r--railties/guides/source/asset_pipeline.textile18
1 files changed, 9 insertions, 9 deletions
diff --git a/railties/guides/source/asset_pipeline.textile b/railties/guides/source/asset_pipeline.textile
index 1448776c25..e4f1e0c41a 100644
--- a/railties/guides/source/asset_pipeline.textile
+++ b/railties/guides/source/asset_pipeline.textile
@@ -414,16 +414,16 @@ For Apache:
# 2 lines to serve pre-gzipped version
RewriteCond %{REQUEST_FILENAME}.gz -s
RewriteRule ^(.+) $1.gz [L]
-
- # without it, Content-Type will be "application/x-gzip"
- <FilesMatch .*\.css.gz>
- ForceType text/css
- </FilesMatch>
-
- <FilesMatch .*\.js.gz>
- ForceType text/javascript
- </FilesMatch>
</LocationMatch>
+
+# without these, Content-Type will be "application/x-gzip"
+<FilesMatch "^/assets/.*\.css.gz$">
+ ForceType text/css
+</FilesMatch>
+
+<FilesMatch "^/assets/.*\.js.gz$">
+ ForceType text/javascript
+</FilesMatch>
</plain>
For nginx: