Forum Discussion
Anthony_Vaz_547
Nimbostratus
May 02, 2006I'm really confused
Hi guys
Sorry this should be really simple, but I just can;t get it.
Basically - I am trying to setup a redirection rule.
What I want is, when a request comes in to a virtua...
May 02, 2006
This looks good to me except that you have two else statements right next to eachother.
I'd try this:
when HTTP_REQUEST {
if { [HTTP::uri] equals "/" } {
if { [HTTP::cookie exists LtpaToken] } {
HTTP::redirect "http://[HTTP::host]/wps/myportal"
} else {
HTTP::redirect "http://[HTTP::host]/wps/portal"
}
}
}Have you determined what exactly your problem is? I'd try throwing in some log statements to find out what's going on.
when HTTP_REQUEST {
log local0. "URI is [HTTP::uri]"
if { [HTTP::uri] equals "/" } {
if { [HTTP::cookie exists LtpaToken] } {
log local0. "Cookie LtpaToken exists, redirecting to http://[HTTP::host]/wps/myportal"
HTTP::redirect "http://[HTTP::host]/wps/myportal"
} else {
log local0. "Cookie LtpaToken does not exist, redirecting to http://[HTTP::host]/wps/portal"
HTTP::redirect "http://[HTTP::host]/wps/portal"
}
}
}Then take a look at the /var/log/ltm file on the BIG-IP to find out what's going on.
-Joe
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
