Skip to content

Instantly share code, notes, and snippets.

@ReekenX
Created March 19, 2014 05:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ReekenX/9635747 to your computer and use it in GitHub Desktop.
Save ReekenX/9635747 to your computer and use it in GitHub Desktop.
Redirect to maintenance except custom IP's
RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_ADDR} !^123\.123\.123\.123
RewriteRule $ /maintenance.html [R=302,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment