Forum Discussion
jokragly
Nimbostratus
Jun 22, 2010Need assistance creating iRule to restrict or allow specific URLs
For instance we have an iRule that does a simple http to https redirect, now we need to restrict that you can only hit https://mysite.com/analytics and nothing else
we need an implicit Deny ...
hoolio
Cirrostratus
Jun 23, 2010It would be simplest if you configured one HTTP VS and one HTTPS VS. You could then redirect all requests to the HTTP VS to HTTPS using an iRule like this:
when HTTP_REQUEST {
HTTP::respond 301 Location "https://[HTTP::host][HTTP::uri]
}
You can use a separate iRule for the HTTPS VS to only allow access to the /analytics URI:
when HTTP_REQUEST {
Check if URI is not exactly /analytics
if {not ([HTTP::uri] eq "/analytics")}{
reject
}
}
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
