httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <>
Subject [Httpd Wiki] Update of "RewriteQueryString" by EricCovener
Date Sat, 30 Nov 2013 13:06:58 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Httpd Wiki" for change notification.

The "RewriteQueryString" page has been changed by EricCovener:

add a strict query matching example

  RewriteCond %{QUERY_STRING} ^(.*)val(.*)$
  RewriteRule /path /path?%1other_val%2
+ === Modifying the Query String (strict match) ===
+ Same as the example above, but with a more strict match of the "key" in the query string.
This is usually overkill unless your URL's have
+ keys that are substrings of other keys.
+ {{{
+ RewriteCond %{QUERY_STRING} (.*(?:^|&))key=val((?:&|$).*)
+ RewriteRule /path /path?%1other_val%2
+ }}}
  === Making the Query String Part of the Path ===
  Take a URL of the form {{{}}} and transform it into {{{}}}.
Note that this particular example will work only for a single var=val pair containing only
letters, numbers, and the underscore character.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message