Forum Discussion
lawrence_Wickli
Nimbostratus
Jun 27, 2006Matchng a specific directory.
Hello all,
I am trying to match a specific directory and redirect apropriately without using regex rules. Here is what I have so far:
if { [string tolower [HTTP::uri]] starts_wit...
Deb_Allen_18
Jun 27, 2006Historic F5 Account
You could use getfield to extract the first directory regardless of trailing slash:
if { [getfield [string tolower [HTTP::uri]] "/" 2] equals "about_us" } {
pool p_http_aboutus
}getfield splits the first parameter into fields delimted by the character in the 2nd parameter, and returns the field requested in the 3rd, starting at index 1. Since a URI always starts with a "/", field 1 is blank and field 2 contains the name of the first directory in the URI.HTH
/deb
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
