Forum Discussion

Kevin_Bozman_15's avatar
Kevin_Bozman_15
Icon for Nimbostratus rankNimbostratus
Dec 04, 2014

Irule redirect on 443 VIP domain.com to www.domain.com

I think I must be missing something simple.

 

I have an irule setup on my port 80 vip. This works great. If I request http://domain.com/ it will redirect to https://www.domain.com/ and also if you request http://www.domain.com/ it will redirect to the https://www.domain.com/

 

I have a 443 VIP setup with a client side SSL profile setup that is working just fine. I want to accomplish a redirect from https://domain.com to https:/www.domain.com.

 

Browsing to domain.com doesn't work because the cert is only for www.domain.com.

 

If I apply to same Irule to the 443 VIP I just get a 404 when trying to hit the site.

 

Here is the Irule Below

 

when HTTP_REQUEST { if { (([HTTP::host] equals "domain.com") or ([HTTP::host] equals "www.domain.com")) } { HTTP::redirect "https://www.domain.com" } }

 

3 Replies

  • And that should work on the 443 VIP correct? Getting ready to leave for vacation. I'll check it out when I get back.

     

    • shaggy's avatar
      shaggy
      Icon for Nimbostratus rankNimbostratus
      it should as long as the 443 vip has a client-ssl profile and http profile assigned. make sure the 80 VIP isn't configured to redirect 80 traffic to 443 (since http-to-https redirects are the norm)