My Blog
Custom wordpress htaccess for maintenance mode
# The following htaccess code has been built on behalf of Rocket Path P.C. by Nicolas Lagios
# With this modified wordpress htaccess code, you can give full access only to one ip, while every other ip will see the comingsoon.html custom page for any request.
# As you understand, you will need to have a comingsoon.html custom page in the root. Feel free to build it as you wish.
# After that, you can visit whatismyipaddress.com, find your ip and replace !^89\.210\.33\.252$ with your own ip (numbers only)
<IfModule mod_rewrite.c>
RewriteEngine On
# Your custom rules
RewriteCond %{REQUEST_URI} !^/comingsoon\.html$ [NC]
RewriteCond %{REMOTE_ADDR} !^89\.210\.33\.355$
RewriteRule ^(.*)$ /comingsoon.html [L,R=302]
# WordPress default rules (if you have them)
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
<Files "comingsoon.html">
Require all granted
</Files>
