Forum Discussion
aweise_7447
Jan 27, 2011Nimbostratus
HTTPS redirect based on URI
Greetings,
We have a VIP that sends traffic to an SSL VPN appliance. The VIP is running on 443 and has a simple pool applied to it. However, we'd like to be able redirect users to a specific URL if they type in an incorrect URL.
For example, the correct URL is https://www.company.com/vpn. Users are simply forgetting to type in the URI portion so that it ends up being "https://www.company.com/". This causes problems and the users are not able to authenticate to the VPN appliance.
Can we have an iRule that does something like this:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/" {
HTTP::redirect "https://www.company.com/vpn"
}
But instead does this for HTTPS? The SSL is not terminated on the BigIP - it's done on the VPN appliance.
Thanks!
- Chris_MillerAltostratusYou'd have to terminate the SSL on the BigIP so it could decrypt the request, see that it contained "/" and redirect it. If you wanted to re-encrypt the traffic on its way to the VPN appliance, that's easy enough.
- Colin_Walker_12Historic F5 AccountIf the SSL is not terminated on the BIG-IP, then you can do absolutely nothing as far as inspection or redirection based on that inspection. SSL is, by definition, intended to stop people from doing exactly what you're trying to do, I.E. packet tampering (inspection, re-writing, etc.).
- aweise_7447NimbostratusPosted By Chris Miller on 01/27/2011 07:58 AM
- Chris_MillerAltostratusGotcha,
- aweise_7447NimbostratusPosted By Chris Miller on 01/27/2011 11:26 AM
- Ashish_Ram_Tak1NimbostratusDear All,
- What_Lies_Bene1CirrostratusOK, if you want to specify a different virtual server the command is just 'virtual 'name'', not virtual server 'name'.
- Ashish_Ram_Tak1NimbostratusDear Steve,
- Ashish_Ram_Tak1NimbostratusDear Steve,
- What_Lies_Bene1CirrostratusAshish, a few corrections;
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/xyz" } { virtual B } elseif { [HTTP::uri] starts_with "/pqr" } { virtual D } else { Virtual A } }
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