WebFaction
Community site: login faq

I have set up a static webapp (with PHP and .htaccess). I would like it to serve compressed files. I have a subdirectory which is actually a git repo, so I have also hidden the .git files via .htaccess in that directory.

So I currently have no .htaccess at the top level, and the following .htaccess in the subdirectory:

RewriteEngine On
RewriteRule \.git - [R=403,L]
RewriteRule \.gitignore - [R=403,L]
SetOutputFilter DEFLATE   # tried it with and without this line - no difference
(IfModule mod_deflate.c)  # actually angle-brackets but this post won't let me use them
  AddOutputFilterByType DEFLATE text/plain 
  AddOutputFilterByType DEFLATE text/csv 
  AddOutputFilterByType DEFLATE text/html 
  AddOutputFilterByType DEFLATE text/xml 
  AddOutputFilterByType DEFLATE text/css 
  AddOutputFilterByType DEFLATE application/xml 
  AddOutputFilterByType DEFLATE application/xhtml+xml 
  AddOutputFilterByType DEFLATE application/rss+xml 
  AddOutputFilterByType DEFLATE application/javascript 
  AddOutputFilterByType DEFLATE application/x-javascript 
(/IfModule)  # actually angle-brackets again

However, it doesn't serve compressed files, as tested at http://www.whatsmyip.org/http-compression-test .

What am I doing wrong? Thanks!

asked 12 May '14, 23:15

Arty
4625
accept rate: 50%

edited 13 May '14, 01:52


That configuration should work.

The exception would be if you're accessing the site via HTTPS, since we disable gzip compression for HTTPS (due the the BREACH vulnerability).

permanent link

answered 13 May '14, 23:38

seanf
12.2k41836
accept rate: 37%

You can now selectively enable and disable gzip compression for HTTPS websites via our control panel at:

https://my.webfaction.com/websites

permanent link

answered 25 May '17, 16:15

seanf
12.2k41836
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×125
×33
×14
×1

question asked: 12 May '14, 23:15

question was seen: 3,630 times

last updated: 25 May '17, 16:15

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM