Forum Discussion
ryank5589
Aug 21, 2021Nimbostratus
iRule header location redirects
We have an application that after a recent software patch has changed its behavior. This has broken the app when accessed via the F5 LTM VIP we have created for it. The app works when accessing the b...
Amine_Kadimi
MVP
when HTTP_RESPONSE {
if { [HTTP::is_redirect]} {
if { [HTTP::header Location] contains "10.x.y.z" } {
HTTP::header replace Location [string map -nocase { "10.x.y.z" "myurl.com" } [HTTP::header Location]]
}
}
Disclaimer: not tested, may need some adjustment
For the string map explanation, refer to: https://devcentral.f5.com/s/articles/irules-101-14-tcl-string-commands-part-2
ryank5589
Aug 23, 2021Nimbostratus
Amine,
Thank you again for the response. The irule you provided did help a bit, I was able to re-write the location header with the proper URL. I am still having issue now after the re-write where it just times out, so the application doesn't like something.
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