Technical Solutions

Down For Maintenance

Posted Saturday, 09 August 2014 10:37

Have you ever needed to work on a site while stopping access for other users. These .htaccess mods will allow you to do just that

Create a offline.html file and place it in your websites route directory. A sample copy is attached to this article

Edit the .htaccess file to incude

RewriteEngine On
RewriteCond %{REMOTE_ADDR} !^999\.999\.999\.999
RewriteCond %{REQUEST_URI} !^/offline\.html$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
RewriteRule ^(.*)$ [R=307,L]

Where is your domain name and the ip address 999\.999\.999\.999 is the ip address you want to allow

Read 1413 times Last modified on Saturday, 09 August 2014 11:28


Invalid Input
Invalid e-mail address
Invalid Input
Invalid Input
Invalid Input
This form collects your name , email, and phone number so that we can get back to you. Please indicate that you consent to this below and then you will be able to contact us via this form.
Invalid Input

Find Us


Contact Details

Sussex PC Works
9 Barclays Court,
Skeyne Drive,
Pulborough RH20 2BG

Tel: 01903680683

©2018 Rhino All rights reserved

This site uses cookies and other tracking technologies to assist with navigation and analyse your use of our website and services.