Forum Discussion

Stephen_Spence_'s avatar
Stephen_Spence_
Icon for Nimbostratus rankNimbostratus
Feb 21, 2013

iRules

Trying to publish an external url :www.samplecompany.com

 

Without showing the internal path: www.samplecompany.com/test/

 

in the browser.

 

Here is what we are currently using but the customer doesn't want to see /test/

 

when HTTP_REQUEST {

 

if { [HTTP::uri] eq "/"} {

 

HTTP::redirect " www.samplecompany.com/test/" }

 

}

 

 

Any assistance is greatly appreciated.

 

S

 

 

 

3 Replies

  • HTTP::redirect sends a 302 redirect to the client, so they'll definitely see the new URI.

     

     

    HTTP::uri on th other hand transparently rewrites the URI in the direction of flow.

     

     

    I think your best bet is the ProxyPass iRule. It's exactly suited for what you need and is straight forward to configure.

     

  • I don't have the link in front of me, but if you do a search on DevCentral for "proxypass" it'll come right up. There are two versions: one for 9.x and another for 10/11.x.

     

     

    You apply this iRule to your virtual server and establish a named data group that defines the URI and/or hostname mappings, and optionally pools.