Forum Discussion
Octavian_Hornoi
Nimbostratus
Jul 15, 2008Renaming File In Transit
One of our partners is hosting a web page where users can select which songs (mp3s) they want to purchase and then after they purchase the mp3 they can click on a link and download them.
...
hoolio
Cirrostratus
Jul 16, 2008Sure, you can do that with an iRule. The only thing changing from 'http://download-ourdomain.com/99_red_balloons.mp3?token=fjkld6y4re392fjfdkafdsa ' to 'http://download-ourdomain.com/GetFile?token=fjkl;d6y4re392fjfdkafdsa;' is the path. You can use HTTP::path to change this:
when HTTP_REQUEST {
Check if requested object is an mp3
(or use some other criteria to determine when to rewrite the path
if {[HTTP::path] ends_with ".mp3"}{
HTTP::path "/GetFile"
}
}
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
