Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed Apache configuration for gzipped assets: FilesMatch and Locatio…

…nMatch cannot be nested.
  • Loading branch information...
commit 5e2bf4de62014820798b271e97fa010ddc1a7e02 1 parent 9584e15
@milgner milgner authored
Showing with 9 additions and 9 deletions.
  1. +9 −9 railties/guides/source/asset_pipeline.textile
View
18 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:
Please sign in to comment.
Something went wrong with that request. Please try again.