Forum Discussion
http header chnage when it redirects to https
I have an application which is http://test1.myapp.com and redirected to https://test1.myapp.com and it is working fine. but need to change the name when it redirects to https. example: application - http;//test1.myapp.com should redirect to https://prod.myapp.com does it possible, note that, I have LTM and ASM license. your help will be appreciated. Thank you
- Lee_Sutcliffe
Nacreous
If I understand you correctly, you'd like to change the redirect from https://test1.myapp.com to https://prod.myapp.com
This can be done with an LTM traffic policy, you can also use the following iRule.
when HTTP_RESPONSE { if {([HTTP::is_redirect]) && ([string tolower [HTTP::header Location]] contains "test1.myapp.com")} { HTTP::header replace Location [string map -nocase {"test1.myapp.com" "prod.myapp.com"} [HTTP::header Location]] } }
Recent Discussions
Related Content
* 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