In httpd.conf I added ErrorDocument 404 /404/index.php between the
<Directory /> and </Directory> tags.
In the body I set a cookie called ABC as follows.
// Set the ABC cookie, the value determines where the user's browser is
directed after
// logging in.
if ( $_SERVER['QUERY_STRING'] <> "" ) {
$strGLOBAL_QSAddOn = "?" . $_SERVER['QUERY_STRING'];
} else {
$strGLOBAL_QSAddOn = "";
}
$strGLOBAL_CurrentURL = "http://" . $_SERVER['HTTP_HOST'] .
$_SERVER['PHP_SELF'] . $strGLOBAL_QSAddOn;
header("set-cookie: DOC=" . $strGLOBAL_CurrentURL . "; path=/;
domain=.utexas.edu");
Before I added the custom 404 the system worked fine. ABC contained a
string representing the current URL.
Now it seems that the cookie is being set twice. Before the page loads the
browser attempts to set the cookie with the correct URL. After the page
loads it attempts to set the same cookie with
http://invalid.com/404/index.php.
If I remove the ErrorDocument line (see above), it works as intended.
Anyone know why this would happen?
--
gorf