You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Guillermo Payet <gp...@oceangroup.com> on 2003/07/02 19:24:02 UTC
[users@httpd] modifying url paramteres with mod_rewrite
Hello,
I need to rewrite a URL like this one:
/cow.jsp?page=2
into:
/animal.jsp?name=cows&page=2
I've tried all kinds of approaches to this with mod_rewrite, but
I cannot get mod_reqrite to modify the QUERY_STRING.
Any clues?
thanks
--G
--
Guillermo Payet
L O C A L H A R V E S T
email: gpayet@localharvest.org
http://www.localharvest.org
http://www.oceangroup.com
---------------------------------------------------------------------
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] modifying url paramteres with mod_rewrite
Posted by Guillermo Payet <gp...@oceangroup.com>.
Aha! The "QSA" flag. And I did not know about it.
Thanks a bunch
--G
On Wed, Jul 02, 2003 at 01:26:59PM -0400, Joshua Slive wrote:
>
> On Wed, 2 Jul 2003, Guillermo Payet wrote:
> > I need to rewrite a URL like this one:
> >
> > /cow.jsp?page=2
> >
> > into:
> >
> > /animal.jsp?name=cows&page=2
> >
> > I've tried all kinds of approaches to this with mod_rewrite, but
> > I cannot get mod_reqrite to modify the QUERY_STRING.
> >
> > Any clues?
>
> RewriteEngine On
> RewriteCond %{QUERY_STRING} ^page=2$
> RewriteRule ^/cow.jsp$ /animal.jsp?name=cows [QSA]
>
> 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
>
--
Guillermo Payet
L O C A L H A R V E S T
email: gpayet@localharvest.org
http://www.localharvest.org
http://www.oceangroup.com
---------------------------------------------------------------------
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] modifying url paramteres with mod_rewrite
Posted by Joshua Slive <jo...@slive.ca>.
On Wed, 2 Jul 2003, Guillermo Payet wrote:
> I need to rewrite a URL like this one:
>
> /cow.jsp?page=2
>
> into:
>
> /animal.jsp?name=cows&page=2
>
> I've tried all kinds of approaches to this with mod_rewrite, but
> I cannot get mod_reqrite to modify the QUERY_STRING.
>
> Any clues?
RewriteEngine On
RewriteCond %{QUERY_STRING} ^page=2$
RewriteRule ^/cow.jsp$ /animal.jsp?name=cows [QSA]
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