Forum Discussion

mikeshermanit_2's avatar
mikeshermanit_2
Icon for Nimbostratus rankNimbostratus
Feb 17, 2017

iRule not adding www (only in chrome)

I have two VS one that is listening on 80 and the other on 443.

 

There's an iRule applied to the 80 VS called "redirectSecureURI" which is basically referencing a data group list that has a bunch of secure strings.

 

Example the data group list may have a string record for "/wife" so that when someone types happy.com/wife it uses https.

 

There's also another iRule applied to the 80 VS, example below, which adds the "www" if it doesn't exist:

 

when HTTP_REQUEST { if { [HTTP::host] equals "happy.com" } { HTTP::respond 301 Location ".[HTTP::host][HTTP::uri]" } }

 

My problem is that ONLY in chrome when I go to happy.com/wife which is supposed to be secure and also add the www it literally doesn't even load the page.

 

In every other browser it works.

 

Has anyone seen this before?

 

  • Try appending

    Connection Close
    to your HTTP respond statement. Chrome/Chromium has has their own mechanics when it comes to handling of TCP connections.

    HTTP::respond 301 Location "http://www.[HTTP::host][HTTP::uri]" Connection Close

    Alternatively, if you have 2 iRules which handle HTTP redirects, are you not triggering TCL multiple redirect/response violation? (Check /var/log/ltm). If that's your problem, also add in a

    event disable
    function, just one line below your
    HTTP::respond
    function.

    Note that to give a try with this new config, you must close your browser and start with a new Window. A new Tab will not suffice.

    Good luck