Skip to content

Instantly share code, notes, and snippets.

@vyatri
Created February 23, 2013 04:31
Show Gist options
  • Select an option

  • Save vyatri/5018421 to your computer and use it in GitHub Desktop.

Select an option

Save vyatri/5018421 to your computer and use it in GitHub Desktop.
A .htaccess script to redirect any uri to maintenance.html . Useful to put the whole site to maintenance mode. You can still work on subdomain.
Options +FollowSymlinks
RewriteEngine on
RewriteCond %{REQUEST_URI} !/maintenance.html$
RewriteCond %{REMOTE_HOST} !^888\.888\.888\.888
RewriteRule $ /maintenance.html [R=302,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment