Topic: All those new mod_rewrite rules in 1.3dev .htaccess?
I was just browsing the dev tree for v1.3, and noticed the new .htaccess in the /extras folder.
There are quite a few new rewrite rules in there, like:
RewriteRule ^topic/([0-9]+)/page/([0-9]+)/?$ viewtopic.php?id=$1&p=$2 [L,NC]
They seem to be there to allow search engine friendly URLs, I guess.
I have a few questions:
(a) Will they slow down a site that uses them? There are quite a few rules - over 50 - for Apache to parse in there. Is there a server load issue users should be aware of?
(b) Have you tested them on a server with mod_security running?
As to (b), sometimes mod_security and mod_rewrite can interfere with each other, since they both want to do URL parsing/filtering.
If mod_security parses the URL first, and a user has a aggressive or very specific set of rules enabled, theoretically mod_security can mangle/rewrite/'normalise' a URL request that mod_rewrite may be expected to act upon.
While I am not sure exactly of the sequencing of how Apache processes new URL requests if both modules are loaded in RAM at web server startup, I suspect the load sequence of modules in httpd.conf has some influence on how URL requests are processed by Apache.
So you might perhaps want to make a recommendation to users to make sure mod_rewrite is loaded up in httpd.conf before mod_security is, so that perhaps mod_rewrite gets to have a go at the URL first, and mod_security only gets to work with the result.