F5 is upgrading its customer support chat feature on My.F5.com. Chat support will be unavailable from 6am-10am PST on 1/20/26. Refer to K000159584 for details.

Forum Discussion

nlong_67651's avatar
nlong_67651
Icon for Nimbostratus rankNimbostratus
Sep 15, 2010

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]

 

}