# Geolocation restrict and redirect to a URL

**URL:** <https://community.f5.com/t/geolocation-restrict-and-redirect-to-a-url/74610>\
**Category:** Technical Forums\
**Tags:** irules, security, big-ip-ltm, geolocation\
**Created:** [June 4, 2024, 9:37am UTC](https://community.f5.com/t/geolocation-restrict-and-redirect-to-a-url/74610 "2024-06-04T09:37:55Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![user777](https://avatars.discourse-cdn.com/v4/letter/u/9dc877/32.png) [@user777](https://community.f5.com/u/user777)\
**Post date:** [June 4, 2024, 9:37am UTC](https://community.f5.com/t/geolocation-restrict-and-redirect-to-a-url/74610/1 "2024-06-04T09:37:55Z")

</div>

hi all,

Currently we have geolocation restriction enforced, where we only allow user from location APAC and those who are not from APAC region will get the default response page “The requested URL has been rejected. Please contact your administrator”, is there a way to configure and redirect them to a custom URL?

I tried to test using irules but it doesnt seem to be working.

Thanks.

---

<div class="post-metadata">

**Author:** ![whisperer](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/whisperer/32/13906_2.png) [@whisperer](https://community.f5.com/u/whisperer)\
**Post date:** [June 4, 2024, 1:37pm UTC](https://community.f5.com/t/geolocation-restrict-and-redirect-to-a-url/74610/2 "2024-06-04T13:37:40Z")

</div>

How are you currently performing the geolocation restriction?

---

<div class="post-metadata">

**Author:** ![user777](https://avatars.discourse-cdn.com/v4/letter/u/9dc877/32.png) [@user777](https://community.f5.com/u/user777)\
**Post date:** [June 20, 2024, 3:20am UTC](https://community.f5.com/t/geolocation-restrict-and-redirect-to-a-url/74610/3 "2024-06-20T03:20:23Z")

</div>

Hi, there’s a geolocation restriction in WAF security policies. we can block geolocation but need to redirect the user into a customized URL instead of the default message.

---

<div class="post-metadata">

**Author:** ![user777](https://avatars.discourse-cdn.com/v4/letter/u/9dc877/32.png) [@user777](https://community.f5.com/u/user777)\
**Post date:** [June 25, 2024, 8:54am UTC](https://community.f5.com/t/geolocation-restrict-and-redirect-to-a-url/74610/4 "2024-06-25T08:54:38Z")

</div>

any help on this guys?
