views:

50

answers:

2

I thought about hitting a file via -f (i think it is) in a mod_rewrite RewriteCond, if the file exists, rewrite to maintenance page. I don't think the performance penalty should be too big, but maybe people had other experiences or objections on this idea?

A: 

Why not just this:

RewriteRule !^maintenance$ maintenance [L]

And in there you repond with the 503 status code.

Gumbo
Because this would mean to edit apache conf + restart httpd. I didn't explicitly mention it, but I'd like to avoid .htaccess files to be involved.
zedoo
A: 

The site is on production for a while now and the touch maintenance script approach is working like a charm.

zedoo