Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
add comment

2 Answers

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
1  
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
add comment

Is the htacess file readable to the webserver?

share|improve this answer
add comment

Your Answer

 
discard

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.