note 64565 deleted from function.header by bjori

From: Date: Tue, 18 Apr 2006 21:06:20 +0000
Subject: note 64565 deleted from function.header by bjori
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-108446@lists.php.net to get a copy of this message
Note Submitter: Reason: in docs ---- PHP does not appear to work with Apache's ability to interpret 'location' URLs starting with a '/' as "internal redirects" -- redirects that are handled internally by Apache and not sent back as 302 Redirect responses to the client. This can be useful for hiding the real location of a file but having Apache still handling the download of the file. For example, the header: Location: /hidden-dir/secret-file.jpg If this is generated from a regular CGI script, Apache will open the file in the hidden-dir directory and send that back to the client without sending back an updated URL. With PHP, the client receives the 302 Redirect response, including the url /hidden-dir/secret-file.jpg and has to fetch the content under that URL (and usually changes the displayed URL as well, thus un-hiding it.) I assume the reason that this doesn't work with PHP is that PHP automatically generates a 302 Redirect header when it sees the Location header even though that might not be what you want. It would be nice if there was a way to tell PHP to *not* generate the 302 Redirect header but *just* the Location header.

« previous php.notes (#108446) next »