Forum Discussion
Dale_Lindsay_19
Nimbostratus
May 05, 2008New to iRules need a starting point
I'm new to iRules. I need to be able to take a specific url and if it has specific content in the url, send it to a specific server. All over traffic can be load-balanced normally to the two servers in the pool.
Could someone let me know how this looks? I may be able to expand from there.
- JRahm
Admin
This should get you started. Note that the myPool and defaultPool can be the same pool, that depends on your requirements.when HTTP_REQUEST { if { [string tolower [HTTP::uri]] contains "your string here" } { pool myPool member 10.10.10.10 } else { pool defaultPool } }
- Dale_Lindsay_19
Nimbostratus
Hi again, - Colin_Walker_12Historic F5 AccountThat iRule looks fine. Have you checked to make sure that it's applied to the appropriate Virtual, and that the traffic in question is actually going through that virtual? If you add a log statement to the iRule to log the HTTP::uri, what does the log file in /var/log/ltm show?
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