How to put "Page under construction" message on the main page

TO close your website for technical works, you can paste this code to the .htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_URI} !^/techwork.html
RewriteRule ^.*$ /techwork.html

Save the changes. Add create the file techwork.html, in which you can write: "Site under construction / modernization". An example of a code for this is shown below:

<html> <head> <title>Site under construction</title> </head> <body> <h1 style="text-align: center;">Site under construction</h1> </body> </html>