httpd-docs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
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:
https://wiki.apache.org/httpd/RewriteQueryString?action=diff&rev1=18&rev2=19

Comment:
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 {{{http://example.com/path?var=val}}} and transform it into {{{http://example.com/path/var/val}}}.
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: docs-unsubscribe@httpd.apache.org
For additional commands, e-mail: docs-help@httpd.apache.org


Mime
View raw message