2

I have a local server and a remote server. On the local server what I'm trying to do works, but the remote server which is hiawatha doesn't.

I'm trying to set a not found header and then respond with the login page. I'm using the following code to do that

if($e === "ErrorSessionExpired")
        {

            header("HTTP/1.0 404 Not Found");
            $output = $this->smarty->fetch("login.tpl");
            echo $output;
            exit();
        }

As I said this works fine on the developing machine, which uses the embedded server of PhpED

Maurizio Pozzobon
  • 3,044
  • 7
  • 34
  • 44

1 Answers1

4

Try:

header("Status: 404 Not Found");
ADW
  • 4,030
  • 17
  • 13
  • To add to this, which seems correct, I'd actually send a 403 since he's issuing a auth challenge. `header("Status: 403 Authorization Required");` – Kevin Peno May 16 '11 at 22:08