Forum Discussion
C_D_18583
Nimbostratus
Nov 03, 2005String Manipulation
I have the following piece of code in my iRule
elseif { $uri starts_with "/nexus/" } {
pool pool1 }
elseif { $uri starts_with "/earth/" } {
pool poo...
C_D_18583
Nimbostratus
Nov 04, 2005...if { not ([URI::basename $uri] contains ".") and not ($uri ends_with "/") } { HTTP::redirect "http://[HTTP::host][HTTP::uri]/"} ...
Thanks , the above statement is very close
The basename is picking the last item of the uri after the last /
For example If I have this case.
http://testdomain.com/ADforms/trial
Basename picks up trial . I need to extract the first value after the domain which is ADforms . If it does not contain a "." or it does not end with a / then do the HTTP redirect, else go to the next statement.
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