I'm trying to redirect all users from specific IP ranges to a specific page. Using RewriteCond/Rulke with -ipmatch but it seems to be matching any IP address, those within the CIDR and those way outside the CIDR
In .htaccess
ie it always follows the specialpage.html whatever IP address uswer connecting from (browser).
Server using LiteSpeed Web Server version 6.3.2 (as I note that there were some issues with expr -ipmatch fixed in 6.3.1).
Also tried using the -R method but same redult. Am I doing something daft wrong?
Thanks
Ian
In .htaccess
Code:
<IfModule mod_rewrite.c>
RewriteCond expr "%{REMOTE_ADDR} -ipmatch '86.128.0.0/12'"
RewriteRule .* https://psamathe.net/error_pages/specialpage.html [L]
</IfModule>
Server using LiteSpeed Web Server version 6.3.2 (as I note that there were some issues with expr -ipmatch fixed in 6.3.1).
Also tried using the -R method but same redult. Am I doing something daft wrong?
Thanks
Ian