Forum Discussion

Ghani_32565's avatar
Ghani_32565
Icon for Nimbostratus rankNimbostratus
Jul 18, 2012

URL redirection

Hi. I was wondering if is it possiable to have an iRule to redirect a specific url to another url with a diffrent port.

 

 

 

Example : The common url is and i would like to redirect this to one of the pool member which has this url .

 

 

Is this possiable to do on an iRule. Can;t seem to get eny ideas on this.

 

 

6 Replies

  • Hi Ghani,

     

     

    Port translation is enabled by default on a Virtual Server. If it is not enable it you can enable the checkbox and update the Virtual Server configuration.

     

     

    After it is configured the Virtual Server will automatically provide port translation from whatever port the Virtual Server is configured for (80, 443, etc.) to the port specified in the target pool.

     

     

    Hope this helps.

     

     

  • Hi. thanks for the quick reply. One quick question. Does this apply if the servers are configure to listen on diffrent e.g 7780....hence i configure the VS to be on port 80? I'm just kinda of confuse on the port translation option here. thanks in advance...appreciate it...

     

  • Hi. thanks for the quick reply. One quick question. Does this apply if the servers are configure to listen on diffrent e.g 7780....hence i configure the VS to be on port 80? I'm just kinda of confuse on the port translation option here. thanks in advance...appreciate it...

     

  • Apologize for the double post...i accidently hit the submit button 2X....

     

  • Does this apply if the servers are configure to listen on diffrent e.g 7780....hence i configure the VS to be on port 80? yes, it does.

    the following is an example. you can see client sending request to 172.28.19.79 port 7780.

    New TCP connection 1: 192.168.206.55(50807) <-> 172.28.19.79(7780)

    and bigip sends that request to server which is listening on port 8791.

    New TCP connection 2: 200.200.200.10(50807) <-> 200.200.200.101(8791)

    [root@ve10:Active] config  b virtual bar list
    virtual bar {
       snat automap
       pool foo
       destination 172.28.19.79:7780
       ip protocol 6
       profiles {
          http {}
          tcp {}
       }
    }
    [root@ve10:Active] config  b pool foo list
    pool foo {
       members 200.200.200.101:8791 {}
    }
    
    [root@ve10:Active] config  ssldump -Aed -nni 0.0 port 7780 or port 8791
    New TCP connection 1: 192.168.206.55(50807) <-> 172.28.19.79(7780)
    1342686407.3166 (0.0029)  C>S
    ---------------------------------------------------------------
    GET / HTTP/1.1
    Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    Accept-Language: en-US
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; MS-RTC LM 8; .NET4.0E)
    Accept-Encoding: gzip, deflate
    If-Modified-Since: Fri, 11 Nov 2011 14:48:14 GMT
    If-None-Match: "4183e4-3e-9c564780"
    Host: 172.28.19.79:7780
    Connection: Keep-Alive
    
    ---------------------------------------------------------------
    
    New TCP connection 2: 200.200.200.10(50807) <-> 200.200.200.101(8791)
    1342686407.3175 (0.0009)  C>S
    ---------------------------------------------------------------
    GET / HTTP/1.1
    Accept: application/x-ms-application, image/jpeg, application/xaml+xml, image/gif, image/pjpeg, application/x-ms-xbap, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
    Accept-Language: en-US
    User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1; WOW64; Trident/4.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; .NET4.0C; InfoPath.3; MS-RTC LM 8; .NET4.0E)
    Accept-Encoding: gzip, deflate
    If-Modified-Since: Fri, 11 Nov 2011 14:48:14 GMT
    If-None-Match: "4183e4-3e-9c564780"
    Host: 172.28.19.79:7780
    Connection: Keep-Alive
    
    ---------------------------------------------------------------