You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by "HIRODE,KARTHEEK (HP-Boise,ex1)" <ka...@hp.com> on 2003/10/03 01:54:32 UTC

[users@httpd] QueryString rewriting

Hi all,

We're trying to modify a query-string and modify some values before the
request goes from the web-server into the Tomcat engine. We're tried
mod_alias:RedirectMatch and some mod_rewrite features.....so far no success.

The specific issue is:
	http://someurl.com/app?param1=value1,value2,value3
	to be modified to
	http://someurl.com/app?param1=value1,newValue,value3


Which apache module would you recommend for this? mod_rewrite (from initial
glance) does not seem to address anything past the /app name.

Thanks much
--Kartheek

---------------------------------------------------------------------
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


Re: [users@httpd] QueryString rewriting

Posted by Joshua Slive <jo...@slive.ca>.
On Thu, 2 Oct 2003, HIRODE,KARTHEEK (HP-Boise,ex1) wrote:

> Hi all,
>
> We're trying to modify a query-string and modify some values before the
> request goes from the web-server into the Tomcat engine. We're tried
> mod_alias:RedirectMatch and some mod_rewrite features.....so far no success.
>
> The specific issue is:
> 	http://someurl.com/app?param1=value1,value2,value3
> 	to be modified to
> 	http://someurl.com/app?param1=value1,newValue,value3
>
>
> Which apache module would you recommend for this? mod_rewrite (from initial
> glance) does not seem to address anything past the /app name.

Something like this:

RewriteEngine On
RewriteCond %{QUERY_STRING} ^param1=(.*),value2,(.*)$
RerwiteRule ^/app /app?param1=%1,newValue,%2

Of course, I'm just guessing under exactly what conditions you want the
rewrite to occur.  But it should give you a general idea.

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