WordPress.org

Ready to get started?Download WordPress

Forums

BulletProof Security
[resolved] How to add another IP address to allow access to maintenance mode (3 posts)

  1. riyana
    Member
    Posted 1 year ago #

    I enabled maintenance mode, but I want to allow another IP address in. What is the correct code for adding in the additional IP address in the .htaccess maintenance file? I tried duplicating the existing line but that didn't work.

    http://wordpress.org/extend/plugins/bulletproof-security/

  2. AITpro
    Member
    Plugin Author

    Posted 1 year ago #

    You may or may not have to add the [OR] flag, but technically this code says - if the IP address IS NOT 88.55.66.200 or the IP address IS NOT 44.33.22.200 and the URI/file IS NOT bp-maintenance.php and the URI/file IS NOT abstract-blue-bg.png then rewrite the Request to the bp-maintenance.php file, which means if your IP address IS NOT whitelisted then you will see the Website Under Maintenance page. If your IP Address is one of the IP addresses whitelisted then the rewriterule will display your website to you normally.

    RewriteCond %{REMOTE_ADDR} !^88\.55\.66\.200$ [OR]
    RewriteCond %{REMOTE_ADDR} !^44\.33\.22\.200$
    RewriteCond %{REQUEST_URI} !^/bp-maintenance\.php$
    RewriteCond %{REQUEST_URI} !^/wp-content/plugins/bulletproof-security/abstract-blue-bg\.png$
    RewriteRule ^(.*)$ /bp-maintenance.php [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
  3. riyana
    Member
    Posted 1 year ago #

    Thanks for replying. I figured it out. I was editing the maintenance.htaccess from the plugin page on the Edit/Upload/Download tab, but it was not actually making the edits to the file. I downloaded the file, made the edits manually, re-uploaded, and was able to get it to work with multiple IPs. The [OR] flag is not needed, duplicating the line is fine.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.