note 41725 added to function.file-exists
| From: | alm at rn2 dot php dot net | Date: | Wed, 21 Apr 2004 01:22:32 +0000 |
| Subject: | note 41725 added to function.file-exists | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-68400@lists.php.net to get a copy of this message | ||
cvictor's code can get tripped up by apache's ErrorDocument directive:
"Note that when you specify an ErrorDocument that points to a remote URL (ie. anything with a
method such as "http" in front of it), Apache will send a redirect to the client to tell
it where to find the document, even if the document ends up being on the same server. This has
several implications, the most important being that the client will not receive the original error
status code, but instead will receive a redirect status code. This in turn can confuse web robots
and other clients which try to determine if a URL is valid using the status code."
(http://httpd.apache.org/docs/mod/core.html#errordocument)
I'm at something of a loss to correct this -- could check if there is more than one '302
Found' returned from the host, but that could be a legit redirect instead of a redirect by
ErrorDocument.
----
Manual Page -- http://www.php.net/manual/en/function.file-exists.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41725
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41725&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41725&report=yes
Search -- http://master.php.net/manage/user-notes.php