Forum Discussion
Kenny_Van_73892
Nimbostratus
Sep 01, 2006Prevent users access directly to uri from saved favorite
I wonder if someone can help me out, I'm kinda stumple on this and doesn't know where to start.
I have a website that is behind the Big IP v. 4.5.10. Let say the website is https://www.myco...
Deb_Allen_18
Sep 01, 2006Historic F5 Account
I think the best solution might be to set a session cookie, and redirect on requests for non-root URI's if they don't have it:
when HTTP_REQUEST {
if { ([string length [HTTP::uri]] > 1) }{
if { not ([HTTP::cookie exists "SessionCookie"]) }{
HTTP::redirect "http://www.mycompany.com/"
}
}
}
when HTTP_RESPONSE {
HTTP::cookie insert name "SessionCookie" value [expr { int(1000 * rand()) }]
}
HTH
/deb
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