Forum Discussion
SP_266134
Nimbostratus
Feb 28, 2019Best way to redirect the traffic of request to protect admin modules in a site.
Problem: I have website has some admin modules exposed to public via site/admin. I want to bloc this request by the users, either send the request to another page that does not exist or redirect the...
jaikumar_f5
Noctilucent
Mar 01, 2019Hi SP,
Create a data group with name admin-hosts and add your selected subnet of IPS in it. So anyone aside from this subnet will be redirected to the page you are configuring.
when HTTP_REQUEST {
if { ( [string tolower [HTTP::uri]] starts_with "/admin/" ) } {
if { not ( [class match [IP::client_addr] equals admin-hosts] ) } {
HTTP::redirect "https://www.website.com/"
}
}
}
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
