Forum Discussion
Micka_61352
Jul 21, 2011Nimbostratus
Redirect traffic to root directory on server pool
Hi there,
Wondering if anyone can help. Will this iRule work. I want to be able to look at URL straing for data and send it to specific pool listening on port 81 once it hits t...
The_Bhattman
Jul 21, 2011Nimbostratus
Hi Michael,
I don't believe this will work if I understand your question properly. Hopefully if I do I understand this properly you want to send traffic to pool IESDWEB_HTTP_81 if the URI starts with /DATA/ string, but then to direct them to URI "/" when you send them to the pool else send them to alternate pool.
You could then rewrite this as
when HTTP_REQUEST { switch -glob [string tolower [HTTP::uri]] { "/data/*" { HTTP::uri "/" pool IESDWEB_HTTP_81 } default { pool IESDWEB_HTTP } } }
I choose to use switch statement because in the grander scheme is more efficient then IF-ELSE statements when doing the same comparisons.
I hope this helps
Bhattman
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