This seems to work (but I have to set the status code in PHP)
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/static/.*$
RewriteCond %{REQUEST_URI} !^/media/.*$
RewriteRule .* down.php [L]
and in down.php
<?php
header('HTTP/1.1 503 Service Temporarily Unavailable',true,503);
?>
Any problems with this? My main problems are what the user sees (which is why I save static content) and which search engines see (status code 503).
source
share