Forum Discussion
gh0std0g_79292
Feb 26, 2012Nimbostratus
http response - change location
i'm sure this is straightforward, but i'm brand new to f5...
users on the internet will go to external.domain.com
my iRule has a header replacement statement to replace it with internal.domain.com
now i need to change the server response, because in it, it responds with a location of internal.domain.com 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...
thanks
- Wil_Schultz_101NimbostratusLocation, so you're talking about 301 or 302 responses only? Or do you need to actually change body content?
when HTTP_RESPONSE { switch -glob [HTTP::status] { "30*" { HTTP::header replace Location [string map -nocase {internal.domain.com external.domain.com} [HTTP::header value Location]] } } }
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects