- Activate/Deactivate with a file.
- Bypass with a custom request header.
With the following Apache Rewrite rule, temporarily redirect all traffic to a maintenance page when a file named maintenance
exists at the same level as the DocumentRoot directory. i.e. if your DocumentRoot is /var/www/public_html/
then creating the file /var/www/maintenance
would trigger Maintenance mode.
Use something like the ModHeader Chrome browser extension to bypass the maintenance page by setting a X-Maintenance
request header with a value of tF0BOCn4z8HgG2Kw
(replace this with your own unique passcode string).