Force Login IP range exceptions
-
I installed this plugin and it works perfectly. I saw this script
if( preg_replace(‘/\?.*/’, ”, $url) != preg_replace(‘/\?.*/’, ”, wp_login_url()) && !in_array($url, $whitelist) )
{
if( $_SERVER[‘REMOTE_ADDR’] != ‘x.x.x.x’ ) {
wp_safe_redirect( wp_login_url( $redirect_url ), 302 ); exit();
}
}Is it possible to do this with multiple IP ranges? I have a bunch of internal IP ranges that I want this to ignore. Example: 192.168.1.0/24, 192.168.9.0/24, 10.0.0.1/24 and so on and so forth. I tried replacing the x.x.x.x with x.x.x.x/24 and the rule fails. Any ideas?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Force Login IP range exceptions’ is closed to new replies.