You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Ram Prasanna <me...@gmail.com> on 2008/02/29 07:10:52 UTC

Rewriting the Url

I need to change the appended parameters of the get Request, before it 
gets processed by the default_handler. I have written an input filter, 
changed the r->uri, r->unparsed_uri and filename, however it seems it 
doesn't work.

Actual uri -> www.somedomain.com/index.html?view=xyz
To be changed ->www.somedomain.com/index.html

 I have searched for "?view" in the uri and replaced "?" with '\0'.  
While going out of my input filter all seems that the view gets 
replaced, but i am getting "File doesnot exists" error from default 
handler, on investigating more i found the "r->finfo.filetype" becames 
APR_NOFILE.

Any suggestions?

Thanks in Advance!

--
meendar

Re: Rewriting the Url

Posted by Pitchaimani Muthuveeran <pm...@msys-tech.com>.
I believe that mod_rewrite can be useful for converting static url alone...

----- Original Message ----- 
From: "Peter Belau" <pe...@anchorfree.com>
To: <mo...@httpd.apache.org>
Sent: Saturday, March 01, 2008 8:18 AM
Subject: RE: Rewriting the Url




I believe that you can do this with mod_rewrite. You don't need to reinvent 
this particular wheel unless your rewriting logic is particularly hairy.


-----Original Message-----
From: Ram Prasanna [mailto:meendar@gmail.com]
Sent: Thu 2/28/2008 10:10 PM
To: modules-dev@httpd.apache.org
Subject: Rewriting the Url

I need to change the appended parameters of the get Request, before it
gets processed by the default_handler. I have written an input filter,
changed the r->uri, r->unparsed_uri and filename, however it seems it
doesn't work.

Actual uri -> www.somedomain.com/index.html?view=xyz
To be changed ->www.somedomain.com/index.html

 I have searched for "?view" in the uri and replaced "?" with '\0'.
While going out of my input filter all seems that the view gets
replaced, but i am getting "File doesnot exists" error from default
handler, on investigating more i found the "r->finfo.filetype" becames
APR_NOFILE.

Any suggestions?

Thanks in Advance!

--
meendar



RE: Rewriting the Url

Posted by Peter Belau <pe...@anchorfree.com>.

I believe that you can do this with mod_rewrite. You don't need to reinvent this particular wheel unless your rewriting logic is particularly hairy.


-----Original Message-----
From: Ram Prasanna [mailto:meendar@gmail.com]
Sent: Thu 2/28/2008 10:10 PM
To: modules-dev@httpd.apache.org
Subject: Rewriting the Url
 
I need to change the appended parameters of the get Request, before it 
gets processed by the default_handler. I have written an input filter, 
changed the r->uri, r->unparsed_uri and filename, however it seems it 
doesn't work.

Actual uri -> www.somedomain.com/index.html?view=xyz
To be changed ->www.somedomain.com/index.html

 I have searched for "?view" in the uri and replaced "?" with '\0'.  
While going out of my input filter all seems that the view gets 
replaced, but i am getting "File doesnot exists" error from default 
handler, on investigating more i found the "r->finfo.filetype" becames 
APR_NOFILE.

Any suggestions?

Thanks in Advance!

--
meendar