Forum Discussion
Irule for diverting blocked gelocation users to a page
I have blocked certain users access to a URL through a gelocation in F5 but also want them to be diverted to a page just like we do for a maintanence page
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> } } }
- minhal1984Nimbostratus
Thank s Paulis , i will try this solution
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