httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slive" <jos...@slive.ca>
Subject Re: [users@httpd] Re: users Digest 27 Jun 2006 11:29:42 -0000 Issue 2505
Date Tue, 27 Jun 2006 14:31:24 GMT
On 6/27/06, Brad Bowman <brad@atendesigngroup.com> wrote:

> Which leads me to this question, Is mod_rewrite capable of
> rewriting the query string portion of the url? The end result of what i'm
> hoping to do here is rewrite URI's in the form:
> http://server.com/cgi-bin/miva?Merchant2/merchant.mv+Screen=PROD&Store_Code=server&Product_Code=ow_creme
> into:
> http://server.com/mm5/merchant.mvc?Screen=PROD&Store_Code=server&Product_Code=ow_creme
>
> is that going to be possible? I've got my RewriteLogLevel at 7, and it seems
> to only include the URL in the rewrite schemes, which made me realize i've
> never actually tried a rewrite on the ${QUERY_STRING} portion of a URI.

Under
http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html#rewriterule
see the big block labeled "Note: Query String".

You need to do something like
RewriteCond %{QUERY_STRING} ^(Merchant2/merchant.mv+)(.*)
RewriteRule ^/cgi-bin/miva$ /mm5/merchant.mvc?%2

But watch out: the order of parameters in the query string may be arbitrary.

Joshua.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message