On Mon 23 Mar 2009, Iosif Fettich wrote:
> Or is the [P]roxy flag not working as it should or as I expect it to
> ? It seems to work fine for the subrequest (status=200) ...?

This is exactly the problem. The 404 is normally generated in the 
response phase from the default response handler. The subreq lookup 
won't check that. It does not run the subreq but only checks if after 
fixup there is still no error.

So the simplest solution for you would be an ErrorDocument I think.

Something like this:

ErrorDocument 404 /-/404  <- put an url here you are not using otherwise
RewriteRule ^/-/404 http://...%{REDIRECT_URI} [P]

Write a simple printenv and activate it as ErrorDocument first to get 
the right environment variable names (not sure if it is REDIRECT_URI). 
If you use mod_include that would be

  <!--#printenv -->

in an .shtml file.

This solution should work for GET/HEAD. POST requests are still a 
problem. If you use them we'll make it work without ErrorDocument. BTW, 
why don't you use the file lookup (-f). That is much easier. Is your 
uri->file mapping so complicated?

Torsten

-- 
Need professional mod_perl support?
Just hire me: torsten.foert...@gmx.net

Reply via email to