I was wondering if in the .htaccess file I could have a check to see if a website is down. I found something that will redirect it to the maintenance mode but I don't want to have to go in and add that every time. I have a script that will run and update my live site from a repository. Is there a way to detect this update and automatically put the site in maintenance mode?
#This will redirect the site to maint mode/
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !^/maint\.html$
RewriteRule ^(.*)$ http://website.com/maint.html [R=307,L]