Forum Discussion

Gazzu's avatar
Gazzu
Icon for Nimbostratus rankNimbostratus
May 11, 2017

port redirection from 80 to 20002

Hi, I have received a request wherein requester needs port redirection from 80 to 20002, please help to get the correct irule.

 

  • P_K's avatar
    P_K
    Icon for Altostratus rankAltostratus

    are you trying to redirect on Virtual Server port?

     

  • Gazzu's avatar
    Gazzu
    Icon for Nimbostratus rankNimbostratus

    I did like this, is it ok ?

     

    when HTTP_REQUEST {

     

    Redirect client to the full host name

    HTTP::redirect "https://[HTTP::host]:9614[HTTP::uri]"

     

    }

     

  • P_K's avatar
    P_K
    Icon for Altostratus rankAltostratus

    You can try creating a virtual server with same IP and different Port number(9614) and apply an irule like below to the port 80 virtual server

     

    when HTTP_REQUEST {

     

    virtual virtualservername // replace with name of new virtual server

     

    }

     

    Hope this helps!