Forum Discussion
dcampbell791
Dec 12, 2017Nimbostratus
HTTP Host modification
Howdy all,
In the middle of a mid-sized data center migration for our clients to a new set of F5s. We want to give clients the ability to test migration before we move them permanently. The idea is to give them a test URL or testclientname.companyname.com but have an iRule trim the "test" off the http host and redirect to their new production url clientname.companyname.com. Is that something that is possible?
- Faruk_AYDINNimbostratus
Hi Guy,
Use this iRule:when HTTP_REQUEST { if { [HTTP::host] starts_with "test" } { set new_host [string range [HTTP::host] 4 end] HTTP::redirect "http://$new_host[HTTP::uri] } }
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