Error when using HTTP Location header

From: Date: Wed, 21 Jul 2004 17:00:06 +0000
Subject: Error when using HTTP Location header
Groups: php.general 
Request: Send a blank email to php-general+get-191346@lists.php.net to get a copy of this message
Hi, I'm building a login page that redirects the user to the login form when an incorrect password is entered. An error message is passed as an URL parameter. Something like: if(!$pwd == $correctPwd){ header('Location: ' . urlencode('loginForm.php?error=Incorrect password')); exit; } When I use this page and enter a wrong password, I get a 'Acces Denied' error from my local Apache (1.3) web server. It seems that the server is looking for a file called 'loginForm.php?error=Incorrect password', can't find it, and since directory browsing is disabled, it gives a 'Acces Denied' error. Is there a way I can prevent this with PHP? Or do I have to change something in my Apache config? (Does anybody know what?) Thanks in advance, Arnout

« previous php.general (#191346) next »