views:

495

answers:

2

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
+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