Forum Discussion
reverse proxy one server, multiple uri's
Hi mate!
I'm not following what you need actually, but let me brush up your syntax a bit so it's easier for us to understand your rule (I added a check for redirects so the iRule does not add location into every request):
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains ("/console-selfservice/") } {
HTTP::header replace "Host" site:7004
}
if { [string tolower [HTTP::uri]] contains ("/console-selfservice/TroubleShooting/") } {
HTTP::header replace "Host" site:7004
}
if { [string tolower [HTTP::uri]] contains ("/IMS-AA-IDP/sso/") } {
HTTP::header replace "Host" site:7004
}
}
when HTTP_RESPONSE {
if { [HTTP::is_redirect] } {
HTTP::header replace Location [string map -nocase {site:7004 site:7004} [HTTP::header value Location]]
}
}
One other thing that you might want to consider is that if the second if is true, the first one is as well. Maybe that's not an issue for you, but maybe you want to do an if-else instead?
Could you please explain a bit more thorough what you want to happen with this irule, step by step?
/Patrik
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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