Is there a way to force Apache to replace status 200 with 403?

532 Views Asked by At

I am trying to setup a maintenance page for our website. For this when Apache returns the maintenance page I want it to return status 403 instead of 200. This is a requirement from the UI perspective to integrate with other applications.

Any help or pointers is appreciated.

Thanks

1

There are 1 best solutions below

3
On

start your maintenance page with php http_response_code funkction:

<?php
http_response_code(402);
?>
Sry folks, we're off for a minute.

http://php.net/manual/en/function.http-response-code.php