Forum Discussion
mlick2
Nimbostratus
Jul 11, 2007Redirect based on cookie
I have the following rule applied and working, but I would like to modify it so that rather than doing a redirect, I would just change the uri to a different directory. I have tried a couple of different methods with no success.
The original request is coming in to www.foo.com and the client gets /login.jsp appended from the apache server
when HTTP_REQUEST {
if { [HTTP::cookie exist "cookie"] }{
scan [HTTP::cookie "cookie"] "%f" cookieval
if { $cookieval > 5 } {
HTTP::redirect "http://www.foo.com/sysbusy.htm"
}
}
}
Thanks in advance,
Matt
- Colin_Walker_12Historic F5 AccountIf all you're looking to do is change the redirect to modify the URI directly before passing on the request, you'd want something like:
when HTTP_REQUEST { if { [HTTP::cookie exist "cookie"] }{ scan [HTTP::cookie "cookie"] "%f" cookieval if { $cookieval > 5 } { HTTP::uri "sysbusy.htm" } } }
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