Forum Discussion
Scooter_372595
Nimbostratus
Sep 21, 2018Access Control based on URI and Referer
Hi
I have a situation where I need an Irule to control access to a site I control.
The rules I need are:
a) To allow access based on a uri, eg https://mysite.com/scooter/scooterspagers/* ...
Yann_Desmarest
Cirrus
Sep 28, 2018Hi,
You can use something like that :
when HTTP_REQUEST {
if { !(([HTTP::host] eq mysite.com and [HTTP::path] starts_with "/scooter/scooterspagers/") or ([HTTP::header Referer] eq "something")) } {
HTTP::respond 403 content "Forbidden" Connection Close
}
}
I think that it will provide you the expected behavior.
Regards
Yann
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