Skip to content

Instantly share code, notes, and snippets.

@jnaskali
Created March 8, 2012 10:22
Show Gist options
  • Save jnaskali/2000173 to your computer and use it in GitHub Desktop.
Save jnaskali/2000173 to your computer and use it in GitHub Desktop.
htaccess: Maintenance mode, allow own ip through
# FOR MAINTENANCE ONLY
Options +FollowSymlinks
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} !/maintenange.html$
RewriteCond %{REMOTE_HOST} !^000\.000\.000\.000
RewriteRule $ /maintenance.html [R=302,L]
# REMOVE FOR MAINTENANCE ONLY
# redirect 302 /maintenance.html http://www.yourdomain.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment