Performance Tips for Apache and Enabling .htaccess on Apache for Windows

I have been using XAMPP as a lazy way of getting a PHP/MySQL/Apache environment set up for local development, and was recently looking into server performance.

I wanted to tweak performance on a site-specific level, because some of the tweaks need to be customised on a site, not server, level. The problem I encountered was that my .htaccess file seemed to be ignored.

I was adding this to improve client-side performance, but it simply wasn’t being executed.:


# Disable ETags
Header unset ETag
FileETag None
# Compression
SetOutputFilter DEFLATE
SetEnvIfNoCase Request_URI \
\.(?:gif|jpe?g|png)$ no-gzip dont-vary
Header append Vary User-Agent env=!dont-vary

The solution, is to change some lines in your local apache configuration ( ~/apache/conf/httpd.conf):

Change instances of:

AllowOverride: None

to

AllowOverride: All

It’s as simple as that. I believe that Apache for Windows by default does not allow such overrides within site-specific .htaccess files.


Tips, Web Design

Leave a Reply