Using .Htaccess
If you are using the Apache server, you can use.htaccess to control access of the directories within the server, and send a response code of the server status.
To put the website into maintenance mode, you can use the 503 status code, which indicates that the server is...