Forum Discussion
Problems with redirections
Thank you for answers.
@Yann: These are two separate iRules. Never setup iRules before so I was not sure how to create multiple "if" statements in one iRule. I guess it doesn't make a difference in terms of performance if I have two iRules, with one condition each, or one iRule with multiple conditions? Anyway one iRule per VIP is always more tidy :)
@Nitass: I'll try to be more clear. I need two things in the iRule: 1. Recognise which client has sent a request and forward it into either pool_A or pool_B. 2. Dynamically remove client name from URI for example: https://aa.example.com/client_name/ServiceName needs to be sent to server as http://aa.example.com/ServiceName but if there is dynamically change link, I want to keep it and remove the name again, as in example below: https://aa.example.com/client_name/ServiceName/a/b/c should be http://aa.example.com/ServiceName/a/b/c I have setup same iRule for few different services and they worked fine.
With the problematic one I get back http://aa.example.com/ServiceName to the browser so it tries to use port 80, hence created rewrite profile. With the successful one, the link stays unchanged from the browser point of view.
Now what's happening with pool B, while pool A is chosen as default for VIP, the first request goes to Pool B as it should (iRule is triggered), but because of the changed link (which is visible on the browser) there is no client name in the URI anymore, so rest of the request is sent to the default pool A.
Probably for this particular service I have to use two-way URI modification.
Rewrite profile: { app-service none bypass-list none client-caching-type cach-css-js java-ca-file ca-bundle.crt java-sign-key default.key java-singer default.crt rewrite-list none split-tunneling false }
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