Proxy and header redirection

From: Date: Fri, 08 Sep 2006 20:46:23 +0000
Subject: Proxy and header redirection
Groups: php.general 
Request: Send a blank email to php-general+get-241503@lists.php.net to get a copy of this message
In Apache I can configure a proxy redirect from one URL to another, ej: htp://www.somesite.com/test -> http://www.othersite.com/path/to/display/ So that when the user loads up http://www.somesite.com/test they actually see the content of the redirect instead (without the URL getting rewritten.) However, if that redirected URL happens to be a PHP script with a header() statement in it, things go wrong, ej: http://www.somesite.com/test -> http://www.othersite.com/locate.php?page=test Assume that locate.php does a header() redirect to /path/to/display/, suddenly the proxy redirect doesn't work, instead the user will see the URL they typed in changed into: http://www.somesite.com/test -> http://www.somesite.com/path/to/display/ which will cause 404's. Does this make any sense, and can someone figure out how to fix this? -- W | It's not a bug - it's an undocumented feature. +-------------------------------------------------------------------- Ashley M. Kirchner <mailto:ashley@pcraft.com> . 303.442.6410 x130 IT Director / SysAdmin / Websmith . 800.441.3873 x130 Photo Craft Laboratories, Inc. . 3550 Arapahoe Ave. #6 http://www.pcraft.com ..... . . . Boulder, CO 80303, U.S.A.

« previous php.general (#241503) next »