Apologies if this is a stupid question, but can I control the HTML response from a .htaccess file (Apache)?
In other words something like (psuedo code) Write <!DOCTYPE html><html>...[etc]
The reason I ask is because I would like to "take down" some sites in one "hit", but without replacing any files or having any other kind of holding page.
I found the answer myself, certainly worked for what I needed:
ErrorDocument 503 "<!DOCTYPE html><html><head><title>This website is undergoing maintenance</title></head><body style='font-family: sans-serif'><h1>This website is undergoing maintenance</h1></body></html>"
RewriteEngine On
RewriteRule .* - [R=503,L]
Hope this helps somebody
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With