Forum Discussion
zafer
Nimbostratus
Feb 05, 2010uri based load balance
Hello
i'm using this iRule but i have problem.
The problem is when i request the url "www.domain.com/Touch" (it does not work) but if i add "/" at the end of the word it works (www.domain.com/Touch/)
i think web server is rewriting the url.The request change after the connect to the server www.domain.com/Touch/abc/index.jsp
i think if i add "/" after the word it will work, how can i do this or any suggestion
when HTTP_REQUEST {
set uri_info [HTTP::uri]
if { $uri_info starts_with "/Touch" or $uri_info starts_with "/cis" } {
pool pool_9081
} elseif { $uri_info starts_with "/Dispatch" } {
pool pool_9085
} else { HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
4 Replies
- The_Bhattman
Nimbostratus
Hi Zafer,when HTTP_REQUEST { if { [string tolower[HTTP::uri]] eq "/touch" } { HTTP::redirect "http://[HTTP::host]/[HTTP::uri]/" } }
- zafer
Nimbostratus
it redirects request it is not load balance to the specific pool or member - The_Bhattman
Nimbostratus
Hi Zafer,when HTTP_REQUEST { set uri_info [strng tolower [HTTP::uri]] switch -glob $uri_info { "/touch" { HTTP::redirect "https://[HTTP::host][HTTP::uri]/" } "/touch/*" - /cis*" { pool pool_9081 } "/Dispatch*" { pool pool_9085 } } }
- zafer
Nimbostratus
Hi
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