Forum Discussion

Liang_Chen_5383's avatar
Liang_Chen_5383
Icon for Nimbostratus rankNimbostratus
Sep 29, 2016

Is it possible to create an iRule to Redirect xyz.com to www.xyz.com

Sorry this might be posted before, I would like to know how to redirect xyz.com to www.xyz.com from the load balancers. Currently, on some browsers, typing xyz.com do not automatically redirect to www.xyz.com.

 

1 Reply

  • Of course. You can do this via LTM Policies or via an iRule.

     

    LTM Policy: Condition: http-host = xyz.com Action: Redirect http://www.xyz.com

     

    iRule: when HTTP_REQUEST { if { [HTTP::host] eq "xyz.com" } { HTTP::redirect 302 http://www.xyz.com } }

     

    Greets, svs