0

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

Grk
  • 129
  • 1
  • 1
  • 4

1 Answers1

0

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

Ján Stibila
  • 619
  • 3
  • 12
  • Is there a way to do it without PHP? I ma implementing this with Oracle HTTP Server and it does not come with PHP. And, we want to avoid installing it. – Grk Jan 08 '15 at 15:44
  • If you are using any other scripting language, there should be a way. Otherwise I can't help (but maybe there is solution in .htaccess) – Ján Stibila Jan 08 '15 at 16:20
  • Found a solution to do this without any scripting. Please refer to this link: http://rimuhosting.com/knowledgebase/creating-a-maintenance-page-for-your-site – Grk Jan 09 '15 at 15:23