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]
Andrew
  • 3,453
  • 9
  • 33
  • 36

2 Answers2

1

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

Andrew
  • 3,453
  • 9
  • 33
  • 36
  • 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 06 '10 at 16:21
0

Is the htacess file readable to the webserver?

Jason Tan
  • 2,752
  • 2
  • 17
  • 24