Forum Discussion
sundogbrew
Altocumulus
Jul 31, 2014rule http::host change
I asked a question yesterday which was answered but I guess I need something different.
I asked to redirect to the host name of the URL which would work, but I need to strip the blabla.com off the...
Stefan_Klotz
Cumulonimbus
Aug 01, 2014Hi Joe,
for sure is this doable (almost everything is possible with F5 BIG-IP and iRules).
Not sure where you have the [HTTP::name] from, as this is not a valid command, but your requirement should be solved with this iRule:
when HTTP_REQUEST {
if { [active_members [LB::server pool]] < 1 } {
set subdomain [substr [HTTP::host] 0 "."]
HTTP::redirect "https://redirect.newdomain.com/$subdomain/more/stuff"
}
}
Please give it a try and let me know if this is fine for you.
Ciao Stefan 🙂
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
