Forum Discussion

  • Hello Paul,

     

     

    I think you can do it hopefully by following theses steps in case your VS is using the service port 9614:

     

     

    - First create a VS on port 443

     

    - Create an iRule that only redirects to https://sspr.dorsetcc.gov.uk:9614/

     

    - Assign the iRule to the new VS

     

     

    In this way all the new connections on https only will be redirected to the one with the port number

     

     

    Hope it works for you.

     

     

    Thanks,

     

     

    Bayan
  • I forgot to mention that this is running on ASM, do you think it will still work ?
  • Yes it should since the traffic will be redirected to the original VS though it should pass in ASM.
  • Hi Bayan,

     

     

    Not sure if I've done my IRule correct, but If I have doing what you said did not work.

     

     

    when HTTP_REQUEST {

     

     

    Check host header value

     

    if {[string tolower [HTTP::host]] eq "https://sspr.dorsetcc.gov.uk"}{

     

     

    Redirect client to the full host name

     

    HTTP::redirect "https://sspr.dorsetcc.gov.uk:9614/showLogin.cc[HTTP::uri]"

     

    }

     

    }
  • Its simpler that even that, non-port secified https:// goes to port 443, setup the samp VIP with port 443 and apply the redirect iRule (my guess here is that there is nothing listening specifically on 443 though? if so, then re-insert the string check)

    The URI part will already have "/showLogin.cc" in it so just put that on the end of the host section.

    when HTTP_REQUEST {
    
     Redirect client to the full host name
    
    HTTP::redirect "https://[HTTP::host]:9614[HTTP::uri]"
    
    } 
  • you can do it as simple as this:

    
    when HTTP_REQUEST { 
         HTTP::redirect "https:///sspr.dorsetcc.gov.uk:9614[HTTP::uri]"
    }
     
  • Great debugging trick for seeing what you are putting out to the browser is to insert a logger too (look in your ltm logs for it)

     

     

    log local0. "https://[HTTP::host]:9614[HTTP::uri]"
  • Do I need to create two VS, one with the 443 address on and the other with the 9614 on ?
  • yes two separate VIPs one for 443 and the one you have listening on 9614.

     

     

    If you are asking that question are you using a carte blanche all ports on your existing VIP ?
  • Hi Antony, that irule worked fine with the two VIP's

     

     

    Many Thanks

     

     

    Paul