3

I've investigating performance problems on a website.

The software we're using requires htaccess (i.e. it generates .htaccess itself if it's not there, so moving the rules to httpd.conf is not an option).

However, we also have long (mod_rewritten) urls, especially for images.

So looking at strace, I can see where wehave 10 images on a page, all with paths like

/img/p/12/13/14/14.jpg

It's looking looking for htaccess in 60 folders for just the images alone.

Is there anyway to tell apache to ONLY use the .htaccess that is in use at /var/www/html/site and not to look for any other .htaccess files?

1 Answer 1

1

Apache looks for .htaccess all the way down along a folder path as long as AllowOverride tells it to do so. So my recommendation is to have AllowOverride none (in httpd.conf) for the root directory and AllowOverride whatever only for the directory (tree) where you need it.

You must log in to answer this question.

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