apache - Can I write an HTML response from an .htaccess file -


apologies if stupid question, can control html response .htaccess file (apache)?

in other words (psuedo code) write <!doctype html><html>...[etc]

the reason ask because "take down" sites in 1 "hit", without replacing files or having other kind of holding page.

i found answer myself, worked needed:

errordocument 503 "<!doctype html><html><head><title>this website undergoing maintenance</title></head><body style='font-family: sans-serif'><h1>this website undergoing maintenance</h1></body></html>" rewriteengine on rewriterule .* - [r=503,l] 

hope helps somebody


Comments

Popular posts from this blog

linux - xterm copying to CLIPBOARD using copy-selection causes automatic updating of CLIPBOARD upon mouse selection -

c++ - qgraphicsview horizontal scrolling always has a vertical delta -