httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eric Covener <>
Subject Re: [users@httpd] RewriteCond how to set variable
Date Tue, 21 Dec 2010 17:31:35 GMT
> 1)      RewriteCond %{QUERY_STRING} !XSL=NONE [NC]
> 2)      RewriteCond %{QUERY_STRING} calId=([0-9]+) [NC]
> 3)      RewriteCond %{QUERY_STRING} skinId=([0-9]+) [NC]
> 4)      RewriteRule ^/calendar
>      [L]

some other options to try:

If you know the order, you can capture them all at once.

RewriteCond %{QUERY_STRING} callId=(\d+).*skinId=(\d+)

or if you only have two vars but don't know the order:

RewriteCond %{QUERY_STRING} callId=(\d+).*skinId=(\d+) [OR]
RewriteCond %{QUERY_STRING} skinId=(\d+).*callId=(\d+)

Otherwise, you can use and re-capture them to pass them along assuming
you don't expect a comma in your query string:

 RewriteCond %{QUERY_STRING} calId=([0-9]+) [NC]
 RewriteCond %{QUERY_STRING},%1 skinId=([0-9]+).*,(\d+) [NC]>

Eric Covener

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