Forum Discussion
therob152
Nimbostratus
Nov 11, 2016Move [HTTP::host] field to path
Hi,
I am trying to do the following:
Inbound to F5 - https://customer.f5.com/
Re-write to - https://f5.com/customer
Where "customer" could be any potential customer.
I have start...
Kai_Wilke
MVP
Nov 11, 2016Hi Therob152,
try the iRule below...
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] ends_with ".f5.com" } then {
HTTP::uri "/[getfield [HTTP::host] "." 1][HTTP::uri]"
HTTP::host [domain [HTTP::host] 2]
}
log local0.debug "New URL is: https://[HTTP::host][HTTP::uri]"
}
Cheers, Kai
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