Forum Discussion
Puneet_73909
Nimbostratus
Sep 09, 2009Redirection to another LB Virtual Server
Hi,
I am trying to redirect HTTP request to another Virtual Server(configured on different Load Balancer) If request comes with uri: "/abc". I need help to write an irule for same which I am unable to do so.
Thanks,
Puneet Khanna
3 Replies
- The_Bhattman
Nimbostratus
Hi Puneet,
Here is a example of a simple redirectionwhen HTTP_REQUEST { if { [HTTP::uri] eq "/abc" } { HTTP::redirect "HTTP://anothervirtualserverdomain.com/" } }
Hope this helps
CB - Puneet_73909
Nimbostratus
CB,
I have different rquirement...
When request comes in...
http://int1.abc.com/ => Redirects to original pool in Production environment
and when Request come with ....
http://int1.abc.com/distcache-sample/ => it should redirect to new VIP which is configured on different LB in QA environment. - The_Bhattman
Nimbostratus
well you can write that in the following waywhen HTTP_REQUEST { if { [HTTP::host] eq "int1.abc.com" } { switch -glob [HTTP::uri] { "/" { pool original_pool } "/distcache-sample" { HTTP::redirect "HTTP://anothervirtualserverdomain.com/" } } } }
CB
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
