Forum Discussion
Hamish
Jul 08, 2010Cirrocumulus
You have 2 choices.
1. Hardcode the content to be sent back in the iRule itself.
2. Or read the content from a DataGroup (Class).
I did write an iRule last year for a customer that let you use the F5 as a web server, and used datagroups as the 'filesystem' repository...
If you're going to go down that route, then the hardest thing is to get the binary content into the DataGroup itself. (That's only 'hard' because you have to encode the binary file and then add it into key/value pairs in a string DataGroup (I used a perl script and iControl to read a real filesystem, encode and upload the values, using the filename as the key. And adding in the mimetype as well so the iRule didn't need to figure it out).
(Sorry to be vague, but I don't have the iRule or perl code that I wrote - But it is my recommendation to go this way... It's harder at first, but oh so easy to add new files... Just drop them in a directory on a server and run the upload command).
H