Forum Discussion
Rudy_Torres_798
Nimbostratus
Oct 13, 2006Creating 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?
- hoolio
Cirrostratus
Hi, - Rudy_Torres_798
Nimbostratus
Thanks for your help. That seems to work fine.
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