Skip to content

Instantly share code, notes, and snippets.

@marsicdev
Created July 14, 2019 22:25
Show Gist options
  • Save marsicdev/89812e11282238a6fe63e3f1bcaf86b7 to your computer and use it in GitHub Desktop.
Save marsicdev/89812e11282238a6fe63e3f1bcaf86b7 to your computer and use it in GitHub Desktop.
MAINTENANCE-PAGE REDIRECT
# 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