Forum Discussion
Irule for diverting blocked gelocation users to a page
- Nov 22, 2023
minhal1984 The iRule should look similar to the following. Please keep in mind that because of the user agreement you are not allowed to log the geolocation information so try not to use what exactly they matched. You can also change the information in the HTML code to display what you would like and you can also change the HTTP response code.
when HTTP_REQUEST priority 500 { if { <geolocation_match_statement> } { HTTP::respond 200 content { <html> <head> <title>You Have Been Blocked</title> </head> <body>You Have Been Blocked</body> </html> } } }
minhal1984 The iRule should look similar to the following. Please keep in mind that because of the user agreement you are not allowed to log the geolocation information so try not to use what exactly they matched. You can also change the information in the HTML code to display what you would like and you can also change the HTTP response code.
when HTTP_REQUEST priority 500 {
if { <geolocation_match_statement> } {
HTTP::respond 200 content {
<html>
<head>
<title>You Have Been Blocked</title>
</head>
<body>You Have Been Blocked</body>
</html>
}
}
}
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com