Todd_94419
Sep 13, 2011Nimbostratus
HTTP to HTTPS Redirect based on URI
It would appear that there have been several posts pretaining to this type of question but I have been unable to find something that fits exactly, and I am not able to get it to work.
Trying to redirect from my HTTP VIP to HTTPS VIP only if certain link is clicked.
URI for the link is www.company.com/abc
At that point I would want the link to be redirected to the HTTPS version of that page. This is what I have tried with no luck.
when HTTP_REQUEST {
if {[HTTP::uri] eq "/abc"} {
HTTP::redirect "https://www.company.com/abc[HTTP::uri]"
}
}
I've tried a 301 redirect as well thinking that might work...
As you can tell I'm pretty new to F5 and iRules. Sorry if I've overcomplicated things... any help is appreciated.
Thanks