Re: [users@httpd] Re: users Digest 27 Jun 2006 11:29:42 -0000 Issue 2505

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 6/27/06, Brad Bowman <brad@xxxxxxxxxxxxxxxxxxx> 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@xxxxxxxxxxxxxxxx
  "   from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux