I m trying to set a custom HTTP 1.0 status code in order to return more descriptive error messages via AJAX (using jQuery).
In PHP I have something like:
header( HTTP/1.0 909 Hello World );
exit;
This works as expected on my development environment using Apache 2.2.15 but it does not work on the production webserver running LiteSpeed 5.5. LiteSpeed instead returns a 200 OK
.
Using this:
header( HTTP/1.0 404 Hello World );
exit;
Apache returns the 404
with the text above. LiteSpeed replaces the custom text with the default Not Found .
Any idea how to override this feature in LiteSpeed to make it work the same way as Apache? I understand they are supposed to be comparable webservers.
Any ideas, please do let me know.
-P.