简体   繁体   中英

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

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

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM