Allow multiple IPs to access Wordpress Site Admin via .htaccess Allow multiple IPs to access Wordpress Site Admin via .htaccess wordpress wordpress

Allow multiple IPs to access Wordpress Site Admin via .htaccess


The answer might be a bit late but:

 RewriteCond %{REMOTE_HOST} !(123\.456\.789\.101|123\.456\.789\.102|123\.456\.789\.103)

works well.


Well you wanted IPs not hosts, so make sure to do that. Then chain them together using your intended logic:

RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.2$RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.3$RewriteRule .* /maintenance.html [R=302,L]