Forum Discussion
JVV_137012
Nimbostratus
Apr 28, 2016URL rewrite (or HTTP forwarding) using iRule?
Hi All,
Could you please comment on the requirement below?
HTTP client sends out an HTTP request with POST data and a header, say Header_1
Proxy (F5-LTM) should:
a. fetch the ...
ssievers_87378
Nimbostratus
Apr 29, 2016First, I think you have to configure the virtual Server on Port 80 - no magic here. Second, you can create a datagroup like this:
class header_mapping {
headervalue1 /test
headervalue2 /dev/test2
...
}
Third, You can create an iRule like this:
WHEN_HTTP_REQUEST {
set location [findclass [HTTP::header "header_1"] header_mapping " "]
if { ($location ne "") } {
HTTP::respond 301 Location "http://www.domain.de$location"
return
}
}
See also https://devcentral.f5.com/wiki/iRules.findclass.ashx
JVV_137012
Nimbostratus
Apr 30, 2016Thanks ssievers. I appreciate your help.
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