
Because I have to look this up from time to time, a note to myself: Add the contents below to your .htaccess to have Apache respond with a “Temporarily Unavailable” message in case a .maintenance file exists. — Handy during deploys
RewriteEngine On
# Show "Temporarily Unavailable" page if there's a .maintenance file present
RewriteCond %{DOCUMENT_ROOT}/.maintenance -f
RewriteRule .* - [R=503,L]
~
Thank me with a coffee.
I don’t do this for profit but a small one-time donation would surely put a smile on my face. Thanks!
To stay in the loop you can follow bramus on Bluesky or subscribe to the RSS feed.