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...
hoolio
Cirrostratus
Apr 09, 2010I assume you want to check the client IP for requests to /claytonkb/assets? If so, you can use this:
when HTTP_REQUEST {
Check the requested path set to lowercase
switch [string tolower [HTTP::path]] {
"/claytonkb/assets" -
"/claytonkb" -
"/claytonkb/" {
Requested path was exactly /claytonkb or /claytonkb/, so check if the client IP is not in the datagroup
if {not [matchclass [IP::client_addr] equals $::Calyton_allowed_IPs] }{
log local0. "[IP::client_addr]:[TCP::client_port]: Redirecting request from [HTTP::uri]"
HTTP::redirect "http://static.bla.com/403.htm"
}
}
}
}
Aaron
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
