nlong_67651
Sep 15, 2010Nimbostratus
https and www redirect
I am trying to figure out how to redirect the initial requests for http://sitename.com/* and https://sitename.com/* to https://www.sitename.com/* Is this easily accomplished using one irule? All SSL connections are terminating directly on the webservers, but since the initial connection to https://sitename.com is HTTP, I don't believe this matters.
I understand how to do a basic subdomain redirect, and how to redirect to https, but I'm unsure how to tie the two together. Here is the redirect I'm currently using:
when HTTP_REQUEST {
HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri]
}