Forum Discussion
OviShare_69630
Nov 02, 2009Nimbostratus
iRule Optimization
I have recently run into a performance logjam with my load balancer, and I need help! Without commenting on the logic of doing things this way (we know it is not optimal and are working on a better l...
The_Bhattman
Nov 03, 2009Nimbostratus
Well it's certainly possible to re-arrange it
Try the following
when HTTP_REQUEST {
if { (![string tolower [HTTP::header Referer]] contains ".domain1.com") and (![string tolower [HTTP::header Referer]] contains ".domain2.com") } {
if { [matchclass [string tolower [HTTP::path]] contains $::restricted_URL_datagroup] ) } {
HTTP::respond 404 content ""
}
}
}
or
when HTTP_REQUEST {
switch -global [string tolower [HTTP::header Referer]] {
"*.domain1.com" -
"*.domain2.com" {
if { [matchclass [string tolower [HTTP::path]] contains $::restricted_URL_datagroup] ) } {
HTTP::respond 404 content ""
}
}
}
}
Note: I didn't check the syntax so you might need to tweek it.
CB
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