Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My Zend Framework application has a public directory which contains an htaccess file. If the file isn't found in the public directory, it routes the request through the application. I have an MP3 file within my public directory, but the htaccess file is routing the request through the application!

Do you see anything wrong with my htaccess file?

AddDefaultCharset utf-8

RewriteEngine on
RewriteRule  ^Resources/.*         -  [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|gif|jpg|png|css|htm|html|php|pdf|doc|txt|swf|xml|mp3)$ /index.php [NC]
share|improve this question

Turns out the htaccess stuff was also embedded into the apache config file. My co-worker said this is a performance booster.

share|improve this answer
Indeed, if you have htacces files apache needs to scan each dir it traverses to get to a file to see if there is an htaccess file and if there is it needs to parse it and act upon it. If you turn htaccess files off you can get better performance. – Jason Tan May 6 '10 at 16:21

Is the htacess file readable to the webserver?

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.