WordPress.org

Ready to get started?Download WordPress

Forums

IP Range Recognition (3 posts)

  1. igendreau
    Member
    Posted 1 year ago #

    I'd like to be able to create this setup for my WP site:

    -If site is being accessed by a particular IP address range, then user gets access
    -Otherwise, user needs a password

    Basically, I'm trying to create an intranet, but needs to be easily accessible anywhere. If user is in the building, the site doesn't need a password, otherwise you need to log in. Any ideas?

  2. Pioneer Valley Web Design
    Member
    Posted 1 year ago #

    This can be done in .htaccess (check with webhost on what you may or may not be able to accomplish at your server access level, especially if on shared hosting)

    This Stack Exchange convo discussed the basic allow/deny principle and please note that wild cards * can be used to create a blocked IP range...

    ErrorDocument 403 /specific_page.html
    Order Allow,Deny
    Allow from 111.222.333.444

    Create the .html page something like a middle finger pointing up (lol) and mod above to:

    ErrorDocument 403 /specific_page.html //create this page<===
    Order Allow,Deny
    Deny from 'number'.*

    *.*.*.* would block all - don't do that...

    111.* block all in this address range...

  3. igendreau
    Member
    Posted 1 year ago #

    Okay, now will that just allow me to grant access to the correct IP range? I'd like to be able to grant access to all address ranges, I just want a certain IP address range to be able to skip a login and password, while everyone else needs to.

Topic Closed

This topic has been closed to new replies.

About this Topic