Forum Discussion
Aviv
Cirrus
Jun 18, 2014Irule Wildcard with excules
Hi !
I need an irule that will redirect to another url all request that contains _vti_bi but will exclude 2 url's :
/_/_vti_bin -> to redirect
/_/_vti_bin/client.svc/ProcessQuery -> ...
kunjan_118660
Cumulonimbus
Jun 18, 2014Try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "_vti_bi" } {
switch -glob [string tolower [HTTP::uri]] {
"/_/_vti_bin/client.svc/ProcessQuery" {
return
}
"/*/_vti_bin/sites.asmx" {
return
}
default {
HTTP::redirect "http://www.xyz.com"
}
}
}
}
- Cory_50405Jun 18, 2014
Noctilucent
First condition in the switch will never match. Remove the capital letters from the string: "/_/_vti_bin/client.svc/processquery" - kunjan_118660Jun 18, 2014
Cumulonimbus
Thanks. But I can't seem to modify it. - AvivJun 22, 2014
Cirrus
Hi kunjan! Thanks for your help. i tried your irule but it looks like it not work can you check if the irule works please?
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