I have a problem with the php function http_response_code(). I have set the ErrorDocument 404 in a htaccess file in the root directory of my website to redirect every wrong call to a php file. In this php file, I would like to set the header of the response in some cases to code 200 OK. But this doesn't work. Chrome always says to me that the status code is 404.
This is the content of my .htaccess file:
ErrorDocument 404 /abc.php
This is the content of my simple abc.php file:
<?php
http_response_code(200);
?>
Test
If I use another code e.g. 201, 301 or something else, it works. Only 200 is not working.
Here is a link to the example: http://test.foxpage.de/abdfgsdfgsdfgsdfgsdf
Can someone help me?
Thx!!