Here’s how to create a simple “under construction page” using HTML for a website that doesn’t utilize any CMS (Content Management Systems).
Single Page Site Under Construction Page
If your site consists of one page, the index page, follow the instructions below.
Upload an under construction image to your website server. This can usually be done by:
- Logging into host service provider
- Accessing cPanel
- Open file manager
- Go to website root folder
- Upload an image to an appropriate folder
- Create an HTML file that will replace your index file
- Add code that will load a page with a full-size background image (the one you uploaded in step 5)
- edit your .htaccess file (or create one in root foler) and add the following line
DirectoryIndex <name of replacement index file created in step 6>
That’s it.
Multi-Page Site Under Construction Page
If you have multiple live pages and would like them all to display under construction page, simply follow all steps except for step 8. Replace step 8 with the step below.
- edit your .htaccess file (or create one in root foler) and add the following lines
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/<name of replacement index file created in step 6>$
RewriteCond %{REQUEST_URI} !\.(gif|jpe?g|png|css|js)$
RewriteRule .* /<name of replacement index file created in step 6> [L,R=302]