4 ms·
I'm guessing having configuration centralized is also easier to manage and a bit more secure. As for performance, doesn't/couldn't Apache parse and cache a .ht
by Hexstream 17y ago
I'm guessing having configuration centralized is also easier to manage and a bit more secure.
As for performance, doesn't/couldn't Apache parse and cache a .htaccess file just once, and then only check the timestamp on subsequent requests?
- olefoo 17y agoIt still has to stat the file every time. And it's worse than you think. A path with four elements like http://example.com/one/two/three/four/thing.php http://example.com/one/two/three/four/thing.php requires that 5 directories be checked for an .htaccess file. Which means apache has to keep track of if there was .htaccess file in that directory the last time it looked for 5 directories, and for each of those whether the timestamp or the size has changed. I'd have to look at the code to see if it caches information about override files but I don't think it does.