Forum Discussion
DM_5174
Nimbostratus
Jun 20, 2007Need urgent Redirect help!!!!
Hi all -
I have a problem here with redirecting the URL.
1. when users come in with http, the rule below needs to do a https redirect. This is working so far, however, when I try t...
Colin_Walker_12
Jun 20, 2007Historic F5 Account
Well now you're talking about two separate iRules, on two separate Virtual Servers.
On the port 80 virtual server you'd have the simple rule that you posted above:
when HTTP_REQUEST {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}Then you'd have another virtual server set up with the same IP address listening on port 443. That virtual server would then have an iRule assigned to it that would check to see if the URI started with site[1-4] and send them to the appropriate pool if that was the case.
Something like:
when HTTP_REQUEST {
switch -glob [string tolower [HTTP::uri]] {
"/site1*" -
"/site2*" -
"/site3*" -
"/site4*" {
pool www_apache
}
}
}Keep in mind that the Virtual Server listening on 443 will have to have a client SSL profile configured as well so that it can decrypt the traffic at the BIG-IP, otherwise it won't be able to read the URI to route appropriately.
HTH,
Colin
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