Overwriting the status code

Discussion in 'PHP' started by fcmisc, Jun 19, 2006.

  1. #1
    Hi,

    In order to get SEF URL's on an IIS environment, I'm redirecting 404 missing file errors to a php script and parsing the URL of the error. As part of this, I'd like to set the status code to a normal 200, rather than 404.

    The code I'm using to attempt this is:

    header("Status: 200 OK");

    But phpinfo tells me that the status code is still 404.

    Please help,

    Kind regards,

    fcmisc.
     
    fcmisc, Jun 19, 2006 IP
  2. ideas_man

    ideas_man Active Member

    Messages:
    212
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    58
    #2
    Try:

    header("HTTP/1.1 200 OK");

    Hope this helps :)
     
    ideas_man, Jun 19, 2006 IP