theizer_91634
Sep 22, 2010Nimbostratus
simple redirection not working as expected - please help
I need requests to http://website.com to be redirected to http://www.website.com (which also needs to be redirected to https)
Here is the irule I created to do this:
when HTTP_REQUEST {
if {[HTTP::uri] equals {website.com}} {
HTTP::uri {www.website.com}
} else {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}
When I applied this and opened http://website.com it just redirected to https://website.com. I used the iRule Redirection generator to create the first part of the if/else but it doesn't appear to be triggering off http://website.com like I thought it would.
Please help a newbie out.
Thanks!