Forum Discussion

sandiksk_35282's avatar
sandiksk_35282
Icon for Altostratus rankAltostratus
Jul 12, 2016

http to https redirection

created a VIP to list on port 80 and applied http profile. Created an irule to redirect all http traffic to https. irule: when HTTP_REQUEST { HTTP::redirect https://[getfield [HTTP::host] ":" 1][HTTP::uri] }

 

When I hit the http://vip.domain.com it is redirecting to https://vip.domain.com .But getting page cannot be displayed but when i access the https vip it is working fine.

 

Need assistance on this

 

5 Replies

  • is there a reason why you don't use the default buildin irule for this?

     

    do you get an error in your ltm log?

     

  • what is the default built in irule for redirecting http to https. No idea on this

     

  • The included iRule for http-to-https redirection is _sys_https_redirect.

     

    You can also use an APM profile on your http VIP. Just create a policy and edit endings to include a redirect option with your https URL.

     

  • ok, please mark the question as answered if it was and explain what you did for others to learn from.