Forum Discussion
jay_41157
Nimbostratus
Aug 27, 2008can this Irule be optimized?
when HTTP_REQUEST {
if { [matchclass [string tolower [HTTP::uri]] starts_with $::legacyPaths] } {
checked for matchclass == legacyPaths and forward to Legacy_http_pool
...
jay_41157
Nimbostratus
Sep 04, 2008This is the updated IRULE for above .... thoughts / comments / suggestions please.
when HTTP_REQUEST {
if { (not [matchclass [string tolower [HTTP::uri]] starts_with $::LegacyExceptions])
and ([matchclass [string tolower [HTTP::uri]] starts_with $::LegacyPaths]) } {
checked for matchclass != exceptions and == LegacyPaths and forward to Legacy_http_pool
use snatpool atypon_SNAT
log local0. "*****DEBUG SNAT applied"
snat 172.23.0.60
pool Legacy_http_pool
HTTP::redirect http://www.google.com
} else {
when uri matches admin in Literatum check for source ip
if { [HTTP::uri] starts_with "/admin"
and (not [matchclass [IP::remote_addr] equals $::Admin]) } {
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://redirect.com/404.html
} else {
pool Stage_http_pool
}
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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