Forum Discussion

gh0std0g_79292's avatar
Icon for Nimbostratus rankNimbostratus
Feb 26, 2012

http response - change location

i'm sure this is straightforward, but i'm brand new to f5...



users on the internet will go to




my iRule has a header replacement statement to replace it with




now i need to change the server response, because in it, it responds with a location of which the external user cannot resolve.




so i simply need to know the syntax and logic to change the http location in the response from internal to external... should this be iRule or stream profile? i've tried both to no avail...






1 Reply

  • Location, so you're talking about 301 or 302 responses only? Or do you need to actually change body content?

    If it's just the redirects this should work, or something close to it anyway.

    when HTTP_RESPONSE {
      switch -glob [HTTP::status] {
       "30*" {
        HTTP::header replace Location [string map -nocase {} [HTTP::header value Location]]