Enable gzip compression for Rackspace cloud sites

You can enable gzip compression for files served by Rackspace cloud sites by uploading an .htaccess file with the following lines to your /web/content folder (see http://httpd.apache.org/docs/current/mod/mod_deflate.html for more options).

# Insert filter SetOutputFilter DEFLATE # Don't compress images SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip dont-vary # Make sure proxies don't deliver the wrong content Header append Vary User-Agent env=!dont-vary

You can test if it worked and gzip compression is enabled by running

curl -I --compress http://www.example.org

If it did work the output will include Content-Encoding: gzip.

Enable gzip compression for Rackspace cloud sites
Share this