Forum Discussion
killyou_51014
May 23, 2012Nimbostratus
iRule that redirects client to FTP from HTTP if downloading file greater than 10 MB
Hello.
I would like to write an iRule that redirects client from HTTP to FTP while downloading file larger than 10MB. Could you help me please? This doesn't work at all:
when HTTP_RESPONSE {
if {[HTTP::header exist "Content-Length"] && [HTTP::header "Content-Length"] >= 10485760 && [HTTP::header "Content-type"] contains "application" }{
HTTP::redirect "ftp://user1:useruser@192.168.0.10[HTTP::header "Content-Location"]"
}
}
Thank you in advance
Peter
- killyou_51014NimbostratusI got it to work. It looks like this right now:
- Kevin_Davies_40NacreousYou could try the following...
HTTP::response 302 Location "ftp://user1:useruser@192.168.0.1:21$uri" Connection Close
- Kevin_Davies_40NacreousCan't edit my post above... stupid website. Had a typo.
- John_Alam_45640Historic F5 AccountFollow that with:
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects