Skip to content

Instantly share code, notes, and snippets.

@ljayz
Created August 16, 2018 00:59
Show Gist options
  • Save ljayz/820bf024c93a04947858508d6cb5374e to your computer and use it in GitHub Desktop.
Save ljayz/820bf024c93a04947858508d6cb5374e to your computer and use it in GitHub Desktop.
Show coming-soon.html page on specific IP address
#placed in .htaccess together with coming-soon.html
<IfModule mod_rewrite.c>
RewriteEngine On
# Allow all static image
RewriteRule ^static/img/(.*)$ static/img/$1 [L]
# Show coming soon page
RewriteCond %{REMOTE_ADDR} !=127.0.0.0 #internal public ip address
RewriteRule ^ coming-soon.html [L]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment