I want to edit my .htaccess to prevent the current folder plus all subfolders to cache content. The site contains html, images, swf, xml files.
I tried this, but the server did not like that.
<FilesMatch ".(js|css|pdf|swf)$">
Header set Cache-Control no-cache
</FilesMatch>
Internal Server Error
The server encountered an internal error or misconfiguration and was
unable to complete your request.Please contact the server administrator, xxx@xxx.com and inform them
of the time the error occurred, and anything you might have done that
may have caused the error.More information about this error may be available in the server error
log.Additionally, a 500 Internal Server Error error was encountered while
trying to use an ErrorDocument to handle the request.Apache/2.2.14 (Ubuntu) Server at http://www.xxx.com Port 80
Any tips?
‘500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request’
it looks like it has nothing to do with the code snippet above. Look in your VirtualHosts configuration. If you define a reference to a location in a DocumentRoot directive that doesn’t exist, then Apache will throw an error.