2

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]

2 Answers 2

1

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

1
  • 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, 2010 at 16:21
0

Is the htacess file readable to the webserver?

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .