Created
June 3, 2016 21:02
-
-
Save lyquix-owner/ef3702f05c6e0b231d3c970bd1a6d16c to your computer and use it in GitHub Desktop.
Maintenance redirect: temporarily redirect all pages to a maintenance page, except for images, css, js, and except specific IP address
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 Redirect | |
RewriteEngine On | |
RewriteCond %{REMOTE_ADDR} !^123\.45\.67\.89$ | |
RewriteCond %{REQUEST_URI} !.*\.(css|jpg|jpeg|gif|png|svg|js) [NC] | |
RewriteCond %{REQUEST_URI} !/maintenance.html$ | |
RewriteRule .* /maintenance.html [R=503,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment