Forum Discussion
IRULES FOR REDIRECTING TRAFFIC BASED ON DYNAMIC CONTENT FOR APPLICATION
I need to redirect traffic for an application, on 10.184.1.191 (VIP) to any of the two servers ,10.184.1.71:9443, or 10.184.1.49:9443. However, the search string is based on paths.
HTTP:80 and HTTPS:443, path /oauth2/* => https: 10.184.1.71:9443 & 10.184.1.49:9443 HTTP:80 and HTTPS:443, path /authenticationendpoint/* => https: 10.184.1.71:9443 & 10.184.1.49:9443 HTTP:80 and HTTPS:443, path /wso2/* => https: 10.184.1.71:9443 & 10.184.1.49:9443 HTTP:80 and HTTPS:443, path /services/* => https: 10.184.1.71:9443 & 10.184.1.49:9443.
The end servers have dynamic content after the Ip:port combination, example
How do i write an irule in this case
3 Replies
- kazeem_yusuf1
Nimbostratus
Hi Faruk, I want them to access all those paths
- Jad_Tabbara__J1
Cirrostratus
Hello Kazeem,
Try the following irule on the VS_HTTPS
when HTTP_REQUEST { set path [string tolower [HTTP::path]] switch -glob $path { "/authenticationendpoint/*" - "/oauth2/*" - "/services/*" - "/wso2/*" { pool pool_name } default { log local0. "Fallback for path: $path -- To be defined" } } }Could you clarify if on VS_HTTP you only want to redirect all traffic to HTTPs or only paths that you specified ?
Regards
- Faruk_AYDIN
Altostratus
Hi Guy,
Do you want just the users to access only those paths and to load balance. Or do you want to do another thing?
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