1. cliveportman
  2. /code
  3. /redirect-by-ip-address-using-.htaccess

Redirect by IP address using .htaccess

Useful for taking an ExpressionEngine or other CMS-powered site offline while still allowing developer access:

RewriteCond %{REMOTE_ADDR|raw}} !^123\.123\.123\.123$
RewriteRule (.*)$ http://cliveportman.co.uk/update-in-progress.html [L,R=301]