When performing site maintenance and updates you may want to redirect visitors to an "Under Maintenance"Â page while allowing your IP access to the entire site.
This can be done using the .htaccess directives below: (replace xxx.xxx.xxx.xxx with your local IP)
#Start under maintenance redirect
RewriteEngine On RewriteBase /
RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1
RewriteCond %{REMOTE_ADDR} !^xxx.xxx.xxx.xxx RewriteCond %{REQUEST_URI} !/maintenance\.html$ RewriteRule .* http://www.yourdomain.com/maintenance_page.html [R=302,L] #End under maintenance redirect
