Skip to content

Instantly share code, notes, and snippets.

@lenybernard
Created April 1, 2015 19:28
Show Gist options
  • Save lenybernard/597ae9ea8add3b7db4b6 to your computer and use it in GitHub Desktop.
Save lenybernard/597ae9ea8add3b7db4b6 to your computer and use it in GitHub Desktop.
<Location />
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ /app.php [QSA,L]
####################################################
########### MAINTENANCE FILE HANDLE ################
ErrorDocument 503 /maintenance.html
### add here the granted ips ###
RewriteCond %{REMOTE_ADDR} !^85.68.186.177$
RewriteCond %{REMOTE_ADDR} !^90.59.143.188$
RewriteCond %{REMOTE_ADDR} !^81.50.112.141$
RewriteCond %{REQUEST_URI} !\.(css|gif|jpg|png)$
RewriteCond %{DOCUMENT_ROOT}/maintenance.html -f
RewriteCond %{SCRIPT_FILENAME} !maintenance.html
RewriteRule ^.*$ - [redirect=503,last]
####################################################
</Location>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment