Forum Discussion
Dave_Hatfield_2
Nimbostratus
Dec 08, 2010after login 2nd redirect causing problems
We have a primary site called "eschool.oursite.org" that we want to auto redirect to another site "portal.oursite.org/eschool". From this site the users can click on a link to take them back to the lo...
Dave_Hatfield_2
Nimbostratus
Dec 08, 2010Resolved the issue with re working the irule to examine the referrer:
when CLIENT_ACCEPTED {
Set a variable to track whether this is an HTTPS request
set https 0
}
when CLIENTSSL_HANDSHAKE {
There was a client side SSL handshake, so update the variable
set https 1
}
when HTTP_REQUEST {
Check if referrer is eschool
if {!([HTTP::header "Referer"] starts_with "https://eschool.mysite.org/webapps/")}{
If there is no URI redirect to portal
if {[HTTP::path] eq "/" }{
HTTP::redirect "https://portal.mysite.org/eschool"
}
}
if {not ($https)}{
If it's not an HTTPS connection, send a redirect
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
So simple when it works. Thanks for your help!
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