Forum Discussion
jay_41157
Nimbostratus
Sep 05, 2008trying to use a wildcard in datagroup for use in irule
Hi,
I am trying to use a wild card in the datagroup below. the requirements are:
/cen
/cen/* <-- i need for this * to be a wild card so I can use the 1st irule below:
------------------------------------------------------------
IRULE1
------------------------------------------------------------
when HTTP_REQUEST {
if { (not [matchclass [string tolower [HTTP::uri]] starts_with $::LegacyExceptions])
and ([matchclass [string tolower [HTTP::uri]] equals $::LegacyPaths] ) } {
checked for matchclass != exceptions and == LegacyPaths and forward to Legacy_http_pool
log local0. "*****DEBUG SNAT applied [HTTP::uri]"
snat 172.23.0.60
pool dev_http_pool
HTTP::redirect http://www.google.com
pool Legacy_http_pool
} else {
when uri matches admin in Literatum check for source ip
if { [HTTP::uri] starts_with "/admin"
and (not [matchclass [IP::remote_addr] equals $::atyponAdmin]) } {
Literatum path for admin uri but not internal IP
log local0. "External IP ([IP::remote_addr]) attempting to access admin path ([HTTP::uri])"
HTTP::redirect http://pubs.acs.org/404.html
} else {
log local0. "*****DEBUG in else part of literatum"
pool Stage_http_pool
}
}
}
------------------------------------------------------------
IRULE2
------------------------------------------------------------
when HTTP_REQUEST {
if { (not [matchclass [string tolower [HTTP::uri]] starts_with $::LegacyExceptions])
and ([matchclass [string tolower [HTTP::uri]] starts_with $::LegacyPaths] or [matchclass [string tolower [HTTP::uri]] equals $::LegacyEquals] ) } {
checked for matchclass != exceptions and == LegacyPaths and forward to Legacy_http_pool
log local0. "*****DEBUG SNAT applied [HTTP::uri]"
snat 172.23.0.60
pool dev_http_pool
HTTP::redirect http://www.google.com
pool Legacy_http_pool
} else {
when uri matches admin in Literatum check for source ip
if { [HTTP::uri] starts_with "/admin"
and (not [matchclass [IP::remote_addr] equals $::atyponAdmin]) } {
Literatum path for admin uri but not internal IP
log local0. "External IP ([IP::remote_addr]) attempting to access admin path ([HTTP::uri])"
HTTP::redirect http://pubs.acs.org/404.html
} else {
log local0. "*****DEBUG in else part of literatum"
pool Stage_http_pool
}
}
}
- hoolio
Cirrostratus
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