How to put Apache website to 503 “temporary down”?

503 Temporarily Unavailable, with trigger

RewriteEngine On
RewriteCond %{ENV:REDIRECT_STATUS} !=503
RewriteCond "/srv/www/example.com/maintenance.trigger" -f
RewriteRule ^(.*)$ /$1 [R=503,L]

If the maintenance.trigger file exists, Apache will serve up a 503 Service Unavailable response. To serve up a custom “down for maintenance” page, use ErrorDocument to specify the file, like so:

ErrorDocument 503 /503_with_cats.html

Enjoy!

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)