You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@httpd.apache.org by Marc Boorshtein <mb...@gmail.com> on 2013/01/21 21:08:50 UTC

[users@httpd] Not re-written URI in module?

All,

I've written a module that checks the URI.  It doesn't work when used
in conjunction with mod_rewrite, as the r->uri and r->unparsed_uri
does not have the original uri but the re-written URI.  Any thoughts
on if there's an environment variable or object that has this original
uri?

Thanks
Marc

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Re: [users@httpd] Not re-written URI in module?

Posted by Nick Kew <ni...@webthing.com>.
On 21 Jan 2013, at 20:08, Marc Boorshtein wrote:

> All,
> 
> I've written a module that checks the URI.  It doesn't work when used
> in conjunction with mod_rewrite, as the r->uri and r->unparsed_uri
> does not have the original uri but the re-written URI.

You could either look at r->prev, or add a hook to your module to
run before mod_rewrite.

A common cause for problems like this is that your "r" may be
a subrequest or internal redirect.  Always worth looking at r->main
and r->prev to see if those are what you want.

-- 
Nick Kew

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org