Forum Discussion
Anas_Hijjawi_44
Nimbostratus
Sep 18, 2011Problem when submitting form of sharepoint using https
Hi, Please find my problem below if any one can provide a solution:
our F5 LTM is doing load balancing and SSL Off-Loading for our sharepoint servers but we are getting the following error w...
Michael_Yates
Nimbostratus
Sep 13, 2012Hi Yozzer,
Remove the elseif statement and the return.
You won't need either. If they qualify the the first event they will be redirected, if not then they will be caught by the else statement and also be redirected (in this case to the same location, but I am assuming that you sanitized the iRule to post it).
A return statement is only used when there is an event triggered in an iRule and you do something and you do not want any further iRule processing. The return statement will break out and not process any further conditions in the iRule.
Try this:
when HTTP_REQUEST {
set name "DC"
if {([string tolower [HTTP::method]] eq "get") && ([string tolower [HTTP::uri]] eq "/") && ([string tolower [HTTP::header "Referer"]] ne "http://cba.com") } {
if {([string tolower [HTTP::cookie value $name]] contains "session=&") } {
HTTP::redirect "http://www.abc.com"
}
else {
HTTP::redirect "http://www.abc.com"
}
}
}
Hope this helps.
Recent Discussions
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