Forum Discussion
Graziano_Rizzat
Nov 27, 2007Historic F5 Account
issue to match datagroup string value with URI variable
Hello,
The irule we are working on is a simple redirect to https when there is a match between uri user request and string on data group.
Unfortunatly something on the matching statement is wrong because there isn't a match even if the user uri request is the same as the datagroup string. Here is the irule:
class urilist {
"/px/"
}
rule test-plugin {
when HTTP_REQUEST {
log local0. "requested host is [HTTP::host] uri starts with [HTTP::uri]"
if { [HTTP::uri] starts_with $::urilist}{
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
else {
log local0. "requested uri is not into the datagroup [HTTP::uri]"
log local0. $::urilist
pool pool-www.farm
}
}
}
Log messages when user ask for /ag/ uri:
Nov 26 17:47:59 bigip1 tmm[1095]: Rule test-plugin : requested host is test.www.farm.csebo.it uri starts with /ag/
Nov 26 17:47:59 bigip1 tmm[1095]: Rule test-plugin : requested uri is not into the datagroup /ag/
Nov 26 17:47:59 bigip1 tmm[1095]: Rule test-plugin : {/px/}
Log messages when user ask for /px/ uri:
Nov 26 17:48:04 bigip1 tmm[1095]: Rule test-plugin : requested host is test.www.farm.csebo.it uri starts with /px/
Nov 26 17:48:04 bigip1 tmm[1095]: Rule test-plugin : requested uri is not into the datagroup /px/
Nov 26 17:48:04 bigip1 tmm[1095]: Rule test-plugin : {/px/}
Your help will be appreciated
Thanks
- hoolio
Cirrostratus
Hi, - Andrea_102213
Nimbostratus
Hi, - Andrea_110925
Nimbostratus
Right.
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