Forum Discussion

Brian_69413's avatar
Brian_69413
Icon for Nimbostratus rankNimbostratus
Apr 23, 2012

FTP Redirect to a different pool and directory

We have an iRule that sends HTTP traffic to a particular URI and changes the pool and path so that the request goes to other unloaded servers holding the same data while not requiring the end user to know there was a change. Here is the code

 

 

[CODE]

 

when HTTP_REQUEST {

 

if { [HTTP::path] eq "" }{

 

pool newpool

 

HTTP::path ""

 

}

 

}

 

[/CODE]

 

 

This works fine, but there is an FTP site holding this same data and they would like that redirected as well. I know I can search for the path in the TCP payload, but how do I get them redirected in this same way? Is this even possible? The FTP is anonymous, so re-authenticating is not an issue.

 

  • Unfortunately, I don't think you get the path in the FTP request until after it's too late to do what you're looking for. If that ends up not being an issue, you could use a stream profile to replace the path and try setting the pool in the STREAM_MATCHED event.

     

     

    I don't think that FTP clients will be as forgiving as HTTP clients.

     

     

    John