Title: Mod_Rewrite Performance

Hello,

We are using Apache as a Reverse-Proxy for our websites, and we implemented mod_rewrite on it so that we can do some "whitelisting" of our websites' URIs.

Our question is, what will give us the best performance :
- Many "RewriteRule" options with simple and short regular expressions,
- or Few "RewriteRule" with long and complex regular expressions ?

For instance, is it better to have :

RewriteRule ^(/a/)(b|c|d|e|f|g|h|i|j|k|l)$ ...

Or

Rewrite ^(/a/b)$ ...
Rewrite ^(/a/c)$ ...
Rewrite ^(/a/d)$ ...
Rewrite ^(/a/e)$ ...
Rewrite ^(/a/f)$ ...
Rewrite ^(/a/g)$ ...
Rewrite ^(/a/h)$ ...
Rewrite ^(/a/i)$ ...
Rewrite ^(/a/j)$ ...
Rewrite ^(/a/k)$ ...
Rewrite ^(/a/l)$ ...

Thanks for your answer,

Thomas.

Reply via email to