Created
January 23, 2016 04:18
-
-
Save rqreyes/90171d20883e4041a20b to your computer and use it in GitHub Desktop.
maintenance page .htaccess
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
#ADD this block of code to the very top of the htaccess file | |
#make sure maintenance.html is in the root | |
#make sure to edit maintenance.html to include client specific information | |
#remove this code when the site maintenance is completed | |
# MAINTENANCE-PAGE REDIRECT | |
<IfModule mod_rewrite.c> | |
RewriteEngine on | |
RewriteCond %{REMOTE_ADDR} !^66\.27\.58\.251 | |
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