httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Arthur Kerpician <>
Subject [users@httpd] rewrite rules optimisation
Date Mon, 14 May 2007 15:12:23 GMT
Im having trouble with defining some rules. This is the layout:
I want to send some GET vars in the URL like this:
Based on this format, the rewriting engine should forward the request 
like this:

I know I can write a rule like this:
RewriteRule /a-([0-9]+),b-([0-9]+),c-([0-9]+),d-([0-9]+) 

The problem is that one or more of these vars can be missing (some of 
them are filters, order by data info) or can be send in a different 
position than the one defined by the rule, something like this:
http://localhost/d-1,a-2/ (should rewrite to 
http://localhost/c-1/ (should rewrite to http://localhost/index.php?c=1)

The hard way, as I see it, is to take into account all combinations / 
possibilities and write a rule for each and every case. Im not a even 
close to be a mod_rewrite fair user but I know there should be an easier 
(optimised) way of doing this.

Thanks all for your input,

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message