Created
April 27, 2016 13:59
-
-
Save MatteoGgl/d4e3f567c4de8dbb8174935e58a99755 to your computer and use it in GitHub Desktop.
Maintenance htaccess file to couple with https://gist.github.com/MatteoGgl/b2638d69806f866cbc3e5fce37747731
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# MAINTENANCE-PAGE REDIRECT | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REMOTE_ADDR} !^123\.456\.789\.000 | |
RewriteCond %{REQUEST_URI} !/maintenance.html$ [NC] | |
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC] | |
RewriteRule .* /maintenance.html [R=302,L] | |
</IfModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment