Forum Discussion
bdub66_173164
Nimbostratus
Oct 10, 2014reverse proxy one server, multiple uri's
Used a rule in this thread. Troy's response actually.
This one site has multiple redirects off port 7004. The initial site connects with the cert and offloads to the client. the other 2 sites do...
Oct 12, 2014
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
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