Forum Discussion

Ross100_322878's avatar
Ross100_322878
Icon for Nimbostratus rankNimbostratus
Jun 02, 2017

External to internal site irule

Hello

I'm trying to do the following with irules. I've had a look around the forums but can't get any of the other examples to work 😕

If a user visits our external site, example.com with a parameter of ?v=[random_value] or ?key=1231231231 F5 should internally use the server internal.site. The internal.site is only accessible within our company. The user should still see example.com?v=[random_value] or example.com?key=1231231231.

Is this possible, or will we need to make internal.site externally accessible? My original though was that F5 would be able to direct the traffic to internal.site behind the scenes!?

All replies appreciated!

Many Thanks, Ross

We have this for the 'redirect' rules, but not sure it's correct.

when HTTP_REQUEST { 
    if { [HTTP::uri] contains "?v=" } {
      HTTP::redirect "internal.site[HTTP::uri]"
    }
    if { [HTTP::uri] contains "key=1231231231" } {
      HTTP::redirect "internal.site[HTTP::uri]"
    }
} 

1 Reply

  • if the hostname is not important your internal site, or your internal site answers every request just define a new pool and use it in your iRule like that:

    when HTTP_REQUEST { 
        if { [HTTP::uri] contains "?v=" || [HTTP::uri] contains "key=1231231231" } {
          pool pool_internal.site
        }
    }