title: How to enable compression in a PHP app on heroku?
body: <p>I am running HTML5 Boilerplate compression in my .htaccess file on a heroku app.  However, it doesn't seem to be working and none of the files are actually being compressed.</p>
  
  <p>I added the heroku php buildpack with:</p>
  
  <pre><code>heroku config:set BUILDPACK_URL=https://github.com/heroku/heroku-buildpack-php
  </code></pre>
  
  <p>but that didn't seem to do anything. I'm pretty new to Heroku so does anyone have any advice?</p>
  
  <p>HTML5 Boilerplate htaccess code:
  </p>
  
  <pre><code># Force compression for mangled headers.
  # http://developer.yahoo.com/blogs/ydn/posts/2010/12/pushing-beyond-gzipping
  &lt;IfModule mod_setenvif.c&gt;
      &lt;IfModule mod_headers.c&gt;
          SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
          RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
      &lt;/IfModule&gt;
  &lt;/IfModule&gt;
  
  # Compress all output labeled with one of the following MIME-types
  # (for Apache versions below 2.3.7, you don't need to enable `mod_filter`
  #  and can remove the `&lt;IfModule mod_filter.c&gt;` and `&lt;/IfModule&gt;` lines
  #  as `AddOutputFilterByType` is still in the core directives).
  &lt;IfModule mod_filter.c&gt;
      AddOutputFilterByType DEFLATE application/atom+xml \
                                    application/javascript \
                                    application/json \
                                    application/rss+xml \
                                    application/vnd.ms-fontobject \
                                    application/x-font-ttf \
                                    application/x-web-app-manifest+json \
                                    application/xhtml+xml \
                                    application/xml \
                                    font/opentype \
                                    image/svg+xml \
                                    image/x-icon \
                                    text/css \
                                    text/html \
                                    text/plain \
                                    text/x-component \
                                    text/xml
  &lt;/IfModule&gt;
  </code></pre>
  
  <p></p>