Created
January 26, 2021 11:41
-
-
Save AntMooreWebDev/0eb79b3745709bd75458eb5fe6e190c7 to your computer and use it in GitHub Desktop.
A small rewrite rule to send all users to maintenance page (except some excluded IP)
This file contains hidden or 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
RewriteEngine on | |
RewriteCond %{REMOTE_ADDR} !^11\.22\.33\.44$ [NC] # Can add multiple lines here for different IPs | |
RewriteCond %{REQUEST_URI} !^/maintenance.html$ [NC] | |
RewriteRule ^(.*)$ "/maintenance.html" [R=302,L] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment