Forum Discussion

mike_125238's avatar
mike_125238
Icon for Nimbostratus rankNimbostratus
Jun 18, 2014

how to configure an iRule redirect an incoming url on port 443 to a pool of servers using a different port and appending a destination path?

for example:

 

pool port-8080 192.168.100.30 192.168.100.31

 

the incoming url is https://test.com. There is a virtual server configured to receive this traffic on port 443 and use an ssl certificate. This virtual server uses an iRule to send the traffic to any member of the pool port-8080 and inserts the path /website to the redirect.

 

Is this possible?

 

thanks

 

2 Replies

  • Should be no problem. Do you want to rewrite any uris that does not start with /website before passing it on to the pool?

    Try this:

    when HTTP_REQUEST {
        set uri [string tolower [HTTP::uri]]
    
        if { !($uri starts_with "/website/" } {
            HTTP::uri "/website/"
        }
    }
    

    /Patrik

  • I see. Let's stay that you rewrite all request URIs to "/website/" before passing it on to the servers. If the html returned for /website/ includes a picture called mike.jpg this would cause /mike.jpg to become /website/ too. Is this was you want?

     

    By multiple URL's, do you mean multiple domains or uris, or both?

     

    /Patrik