Forum Discussion
Rich_L
Nimbostratus
Mar 28, 2017iRule to access URI based off specific device type
I have an iRule in place. The behavior requested is to allow access to only three specific URLs and only if accessing from a device type of iPhone or iPod. If accessing it from any other device or br...
cjunior
Nacreous
Mar 28, 2017Hi, in a rapid reply, I would do this way:
when HTTP_REQUEST {
if { ([HTTP::header User-Agent] contains "iPhone") or ([HTTP::header User-Agent] contains "iPod") } {
if { ([HTTP::uri] ends_with "/LEAD.jsp") or
([HTTP::uri] ends_with "/INV.jsp") or
([HTTP::uri] ends_with "/mobile_entry.jsp") } {
pool oracle_r12uat
Exit from here before I redirect unexpectedly
return
}
}
Redirect when not match any above
HTTP::redirect "https://mysite.com/OA_HTML/access_denied.jsp"
}
Regards.
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
