Forum Discussion
Dan_85248
Sep 04, 2012Nimbostratus
Simple redirect question
So initial URL would be something like
http://www.hostname.com/export/text1/test2.csv
Redirect to http://s3.amazonaws.com/text1/test2.csv
Basically it would need to ...
nitass
Sep 04, 2012Employee
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
destination 172.28.19.79:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if {[HTTP::host] eq "www.hostname.com" and \
[HTTP::uri] contains "/export/"} {
HTTP::redirect "http://s3.amazonaws.com[string map {/export/ /} [HTTP::uri]]"
}
}
}
[root@ve10:Active] config curl -I http://172.28.19.79/export/text1/test2.csv -H "Host: www.hostname.com"
HTTP/1.0 302 Found
Location: http://s3.amazonaws.com/text1/test2.csv
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
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