Forum Discussion
Jason_40769
Nimbostratus
Aug 20, 2010Subsite ACL (Exception)
I have a working irule that blocks access to a subsite of a website based on a IP address. I would however like to add to the rule an exception url. for instance all access is blocked to /admin but i would like a folder behind /admin to be able to be accessed. Lets call that folder /upload.
3 Replies
- Jason_40769
Nimbostratus
Here is the iRule
when HTTP_REQUEST {
if { [class match [string tolower [HTTP::uri]] contains subsite] and ![class match [IP::client_addr] eq allow] } {
discard }
} - Chris_Miller
Altostratus
when HTTP_REQUEST { if { [class match [string tolower [HTTP::uri]] contains subsite] and !([[string tolower [HTTP::uri]] contains "/admin/upload") and ![class match [IP::addr [IP::client_addr]] eq allow] } { discard } }
Should do it. - The_Bhattman
Nimbostratus
Hi Jason,
You could also provide some information to the clients when they are denied access
Here is the one modified from Chris'when HTTP_REQUEST { if { [class match [string tolower [HTTP::uri]] contains subsite] and !([[string tolower [HTTP::uri]] contains "/admin/upload") and ![class match [IP::addr [IP::client_addr]] eq allow] } { HTTP::respond 200 content "Forbidden Redirect From Remote Server\Acess is forbidden" } }
I hope this helps
Bhattman
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
