My server support tells me my htaccess URL rewrites are causing an overhead. I use URL rewriting for "nicer" URLs, mainly (like example.com/?foo=bar will be example.com/foo/bar or so). Generally speaking, what are some tips & tricks to keep in mind when aiming to optimize the htaccess RewriteEngine?
A:
Since mod_rewrite is using regex, i think you'd rather have to optimize your regex !
Boris Guéry
2009-05-15 00:46:47
+4
A:
Move as many .htaccess directives (including mod_rewrite rules) into the httpd configuration (httpd.conf) - this is only read once, on server restart, rather than on per-request, per-directory. Beyond that, unless you've got either an excessive amount of rewrite rules, or an incredibly complex individual rule, there's not much to it.
Keryn Knight
2009-05-29 10:36:33