Forum Discussion
pkhatri_72515
Nimbostratus
Apr 02, 2010How permit part of the url access?
How to permit part of the url accessed by only few IP addresses using data group and part of the same url accessed by all?
for example
http://example.something.com/Part_one should be a...
pkhatri_72515
Nimbostratus
Apr 06, 2010Hi Bhattman,
here is the original iRule
when HTTP_REQUEST {
if { ([string tolower [HTTP::uri]] starts_with "/claytonkb/") or ([string tolower [HTTP::uri]] equals "/claytonkb") } {
if { not ([matchclass [IP::client_addr] equals $::Clayton_allowed_IPs]) } {
log local0. "Caught [HTTP::uri] from [IP::client_addr]"
HTTP::redirect "http://static.bla.com/403.htm"
}
}
}
now in the same url, they added /assests and that is permitted for everybody. would this work?
when HTTP_REQUEST {
if { ([string tolower [HTTP::uri]] starts_with "/claytonkb/") or ([string tolower [HTTP::uri]] equals "/claytonkb") } {
if { not ([matchclass [IP::client_addr] equals $::Clayton_allowed_IPs]) } {
log local0. "Caught [HTTP::uri] from [IP::client_addr]"
HTTP::redirect "http://static.bla.com/403.htm"
elseif { ([string tolower [HTTP::uri] starts_with "/assets/") or ([string tolower [HTTP::uri] eq "/assets") } {
pool acr.bla.com_http
}
}
}
}
Appreciate your help.
PK.
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
