Jump to content
Latest News: (loading..)


This topic is now archived and is closed to further replies.


Site down for maintenance using htaccess

Recommended Posts

I needed a quick and easy method of temporarily closing my live site to all visitors apart from myself. I searched and found the following.


Create a new page called 'maintenance.html' and upload it to your sites root folder. Do not include any images, but add whatever text you like and preferably add a time when the site will be back online. This just helps keep your customers informed.


Add to the start of your root folders htacess file



<IfModule mod_rewrite.c>

RewriteEngine on

RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000

RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC]

RewriteRule .* /maintenance.html [R=302,L]



Change the part of the code that is in red to your ip address keeping the \. and save the changes.


Now you should be able to access your site, whilst sending all other visitors to your maintenance page.


This worked for me so i thought i would share.



Find information about the bootstrap community version here


Make it idiot proof and someone will make a better idiot.

Share this post

Link to post
Share on other sites

There are several more sophisticaled down for maintenance/ holiday/vacation add-ons which you can enable from the admin page but the above will work too!!





Need help installing add ons/contributions, cleaning a hacked site or a bespoke development, check my profile


Virus Threat Scanner

My Contributions

Basic install answers.

Click here for Contributions / Add Ons.

UK your site.

Site Move.

Basic design info.


For links mentioned in old answers that are no longer here follow this link Useful Threads.


If this post was useful, click the Like This button over there ======>>>>>.

Share this post

Link to post
Share on other sites