Author Topic: URL rewrite based on internal IP  (Read 802 times)

Offline einardk

  • Contributor
  • *
  • Posts: 1
  • Karma: 0
URL rewrite based on internal IP
« on: January 02, 2012, 03:47:13 PM »
what is the best way to rewrite a url based on IP location

that is I have internal clients that go to http://internal.company.com and if the IP is from  a specific range I would like to redirect them to http://internal.company.com/EN

Offline mkalle

  • VIP Member
  • ***
  • Posts: 25
  • Karma: 1
Re: URL rewrite based on internal IP
« Reply #1 on: January 03, 2012, 05:20:37 AM »
If you want to do this base on GEO IP, you need to load in a database. thats pretty easy

Then just make a rule, like
CLIENT.IP.SRC.MATCHES_LOCATION(\"Europe\") <respond policy action>

And it sounds like you want to do a responder policy and not a rewrite.

Offline r4lphuk

  • Contributor
  • *
  • Posts: 6
  • Karma: 0
Re: URL rewrite based on internal IP
« Reply #2 on: January 09, 2012, 02:44:37 PM »
I thought this would work, I'm doing something similar and its not working.  As the policy is evaluated for each request the redirect goes into and endless loop, am I missing something?

Offline mkalle

  • VIP Member
  • ***
  • Posts: 25
  • Karma: 1
Re: URL rewrite based on internal IP
« Reply #3 on: January 10, 2012, 12:08:28 AM »
depending on your action, yes

try and paste the config.