WebFaction
Community site: login faq

I'm trying to have Apache limit caching on certain pages served from a django application, but when I edit the .htaccess in the root folder to set the header cache control, I get an internal server error.

My code:


    # .htaccess
    <FilesMatch "\.(flv|gif|jpg|htm|html|css|js)$">
    Header set Cache-Control "max-age=5, must-revalidate"
    </FilesMatch>

asked 13 Feb '12, 17:13

jdotjdot
112
accept rate: 0%

edited 13 Feb '12, 17:19


You should be setting this in the httpd.conf file and not in an .htaccess file. You can also read what the internal server error is in the application log which is located in ~/logs/user/error_appname.log

permanent link

answered 13 Feb '12, 18:10

johns
5.4k312
accept rate: 23%

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:

×225
×75
×28
×2

question asked: 13 Feb '12, 17:13

question was seen: 4,735 times

last updated: 13 Feb '12, 18:10

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2020 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