How to change HTTP status code 404 to 200

Discussion in 'Site & Server Administration' started by rahulsingh, Jun 16, 2008.

  1. #1
    I want change my website HTTP status code right now when any page not avalable on my website its return HTTP status Code 404 now i want to change it to HTTP status Code 200 :confused:
     
    rahulsingh, Jun 16, 2008 IP
  2. jayshah

    jayshah Peon

    Messages:
    1,126
    Likes Received:
    68
    Best Answers:
    1
    Trophy Points:
    0
    #2
    You will need to use .htaccess's ErrorDocument directive to catch all Not Found pages. Then use a scripting language to send a "HTTP/1.1 200 OK" header.
     
    jayshah, Jun 16, 2008 IP
  3. rahulsingh

    rahulsingh Well-Known Member

    Messages:
    256
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    108
    #3
    i am using PHP and sending HTTP/1.1 200 OK in PHP header but its still giving me 404 by this HTTP Tool http://gsitecrawler.com/tools/Server-Status.aspx

    Whats i done i set up 404 page on .htaccess and in 404 PHP page i put HTTP/1.1 200 OK in header
     
    rahulsingh, Jun 16, 2008 IP