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
- Faruk_AYDINNimbostratus
Hi Guy,
- Jad_Tabbara__J1Cirrostratus
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
- kazeem_yusuf1Nimbostratus
Hi Faruk, I want them to access all those paths
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