You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Raman Preet Jaiswal <rj...@sapient.com> on 2003/02/28 12:39:39 UTC
[users@httpd] Rewrite Rule Question
I need to redirect users to a specific page when I get a request.
This redirection is based on the parameters I get in my request.
For example if I receive a request
www.abc.com?name=rama&age=27 then I want to redirect this to www.abc.com/ <http://www.abc.com/rama27> rama27
How can this be written in the httpd.conf file as a RewriteRule?
Thanks
Raman.
Re: [users@httpd] Rewrite Rule Question
Posted by Andrea <so...@polin.it>.
Hi,
put these rules inside the DirectoryBlock into your httpd.conf:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^name=([a-z]+)&age=([0-9]+)$ [NC]
RewriteRule ^$ http://www.mytest.net/%1%2 [NC,R,L]
~Andrea
----- Original Message -----
From: Raman Preet Jaiswal
To: users@httpd.apache.org
Sent: Friday, February 28, 2003 12:39
Subject: [users@httpd] Rewrite Rule Question
I need to redirect users to a specific page when I get a request.
This redirection is based on the parameters I get in my request.
For example if I receive a request
www.abc.com?name=rama&age=27 then I want to redirect this to www.abc.com/rama27
How can this be written in the httpd.conf file as a RewriteRule?
Thanks
Raman.