Skip to content

Commit 368f0fe

Browse files
committed
Revert "Added Apache configuration for dynamic gzip content"
This reverts commit fce92fd. Reason: We want any config that goes into the guides to be 100% right and I'm not entirely sure that this one is it. We already had a similar config that was removed in rails@b1c20e3
1 parent b32ebf0 commit 368f0fe

File tree

1 file changed

+1
-24
lines changed

1 file changed

+1
-24
lines changed

railties/guides/source/asset_pipeline.textile

Lines changed: 1 addition & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -505,30 +505,7 @@ This directive is available if the core module that provides this feature was co
505505

506506
If you're compiling nginx with Phusion Passenger you'll need to pass that option when prompted.
507507

508-
For Apache:
509-
510-
Using the Apache config tricks found on the Crave DIY blog, the following rewrite rules check the client's header to see if gzip is supported, then checks the filesystem to ensure a gzipped version exists, finally serving the gzipped file and forcing a the appropriate type.
511-
512-
<plain>
513-
# Turn on the Rewrite engine
514-
RewriteEngine On
515-
# Check the client headers to see if they accept gzips
516-
RewriteCond %{HTTP:Accept-Encoding} gzip
517-
# Confirm the file exists in gzip format
518-
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_FILENAME}.gz -f
519-
# Rewrite url to us gzip file
520-
RewriteRule (.*\.(js|css))$ $1\.gz [L]
521-
522-
# If we've rewritten to a .css.gz file, force text/css
523-
<FilesMatch .*\.css.gz>
524-
ForceType text/css
525-
</FilesMatch>
526-
527-
# If we've rewritten to a .js.gz file, force application/x-javascript
528-
<FilesMatch .*\.js.gz>
529-
ForceType application/x-javascript
530-
</FilesMatch>
531-
</plain>
508+
A robust configuration for Apache is possible but tricky; please Google around. (Or help update this Guide if you have a good example configuration for Apache.)
532509

533510
h4. Live Compilation
534511

0 commit comments

Comments
 (0)