Forum Discussion
Rob_76452
Nimbostratus
Mar 15, 2010brand new please help redirect based on uri
My sys admin is saying this is really simple, you should already be done but I'm lost. My first experience with F5's. I think the request is simple if you know about F5 though. anyways..
I have a pool and I need it to go to /exchange if it is in the url and just go straight through if it is anything else. That is the request but really I believe he needs it to go to /exchange if it is in the url and /owa for everything else.
I am trying to read/digest the 101 stuff here. Please help if you can.
Thanks,
Rob
- The_Bhattman
Nimbostratus
Hi Rob,when HTTP_REQUEST { if {[HTTP::uri] eq "/blahblah" } { HTTP::redirect "http://www.domain.com/something" } }
- The_Bhattman
Nimbostratus
Hi Rob, - The_Bhattman
Nimbostratus
Hi Rob,when HTTP_REQUEST { if {[HTTP::uri] eq "/exchange" } { pool exchange_pool } else { pool other_pool } }
when HTTP_REQUEST { switch -glob [string tolower[HTTP::uri] { "/exchange" { pool exchange_pool } default {pool other_pool } } }
- naladar_65658
Altostratus
Glad you mentioned the SWITCH command Bhattman, it is perfect for something like this and requires the least amount of overhead to my knowledge. - Rob_76452
Nimbostratus
Hey thank you VERY much!!!! I think I got it working. My tests look good enough to pass back to the sysadmin. Here is what I came up with: - hoolio
Cirrostratus
Hi Rob,when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/exchange*" - "/owa*" { log local0. "Matched exchange or owa uri for [HTTP::uri]" pool tohtca-https } default { log local0.debug "Matched default for [HTTP::uri]" HTTP::uri "/OWA" HTTP::uri "[HTTP::uri]OWA" } } }
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