You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by David Sklar <sk...@student.net> on 1999/09/23 20:38:32 UTC

PR#4920 & PHP 3.0.12 & Apache 1.3.9

I am having a similar problem to the one mentioned in PR#4920 with a 
DirectoryIndex that is a PHP script that does something like

<?php Location('http://example.com/foo/bar.html'); ?>

While the right status code (302) gets sent back to the client whether or
not the page is accessed as http://example.com/ or 
http://example.com/index.html, accessing it as http://example.com/ causes it 
to be logged as a 200.

It looks like this is because mod_dir calls ap_sub_req_lookup_uri() to get
the status code of the subrequest with the DirectoryIndex filename in it. The 
status is eventually returned by ap_unescape_url(), which just checks the 
syntax
of uri - so the PHP handler never interprets the file.

Is there a way around this?

-dave