rah_ip_range
Published under current TXP projects
Block or allow visitors based on their IP. You can define a IP range, and what to do those whose IP is within the range; either allow, or opposite, deny them and allow others outside that range to see the page.
Image: rah_ip_range
List of features
- Block visitors based on the IP -range.
- Comes with a simple customizable tag,
<txp:rah_ip_range />. Include the tag on, section/page templates/forms, where you want the IP ranged blocking/allowing take place. - Returns Textpattern’s error page when user is blocked/access denied.
- Customizable error message and HTTP-status – and of course Textpattern’s error page templates.
Attributes
The tag is <txp:rah_ip_range /> attributes for it follow. Use the tag on places (pages/forms/sections) which you want to restrict from visitors.
message
Error message shown to blocked visitors. Message can be shown with the <txp:error_message /> tag.
Default: message="Access denied" Example: "KO"
status
HTTP error status code returned to blocked visitors.
Default: status="503" Example: "200"
fromip
IP-range’s starting IP (or partial IP). Default unset.
Default: fromip="" Example: "127.0.0.1"
toip
IP-range’s ending IP (or partial IP). Default unset.
Default: toip="" Example: "127.0.0.100"
method
What to do to the visitor when IP is within the range; either deny or allow. Value deny means that all visitors within the range are blocked, and others (outside) are allowed to see the page. Value allow is opposite to deny.
Default: method="allow" Example: "deny"
Example
<txp:rah_ip_range fromip="127.0.0.1" toip="127.0.0.100" method="deny" />
Changelog
Version 0.1
- First release