Forum Discussion
redirect to 403 page error
If the client uri starts with /books, but is not from one of these 3 ip's then they are denied access to page. currently they get a white blank page. We would like the browser to return a 403 page error. So Here is the logic...
Vip ip/dns name is //mystore.com If client is going to //mystore.com - then allow If client is going to //mystore.com/books and src ip is one of the 3 ip's - then all.
anything else gets the 403...
So far looks to be working for //mystore.com clients, we are waiting for /books src ip's to test. Currently if client is //mystore/books and not the src IP's, they get a blank page, that's good but would like the 403 page.
when HTTP_REQUEST {
if { ( [string tolower [HTTP::uri]] starts_with "/books" ) } { if { not ( [IP::addr [IP::client_addr] equals "55.66.77.88"] ) or not ( [IP::addr [IP::client_addr] equals "66.77.88.99"] or not ( [IP::addr [IP::client_addr] equals "77.88.99.10"] ) } { HTTP::redirect "https://[HTTP::host]/" } } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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