Rudy_Torres_798
Oct 13, 2006Nimbostratus
Creating a data class in 9.x
I am trying to create a class in 9.x to allow only certain uri's to each web site. Here is the what the rule looks like.
class allowed_uris {
when HTTP_REQUEST {
if { ( [HTTP::host] contains "website1.com" ) or ( [HTTP::host] contains "website2" ) } {
pool pool1
} elseif { ( [HTTP::host] contains "website3.com" ) and ( [ matchclass [HTTP::uri] contains $::allowed_uris] ) } {
pool pool2
} elseif { ( [HTTP::host] contains "website4") and ( [ matchclass [HTTP::uri] contains $::allowed_uris ] ) } {
pool pool3
} else {
discard
}
}
I know the syntax is :
class allowed_uris { "images" "styles" }
but where or how is the class created?