offloading content with ifiles
Problem this snippet solves: This irule allows to serve parts of a website directly from BIG-IP LTM. Only URIs configured in the data class my_to_serve_files will be served via this irule
Have a l...
Published Mar 18, 2015
Version 1.0koenning_107182
Nimbostratus
Joined May 23, 2007
koenning_107182
Nimbostratus
Joined May 23, 2007
dragonflymr
Feb 18, 2016Cirrostratus
Hi,
Code works great except situation when URI is just "/" - so no basename exist. I resolved it by adding entry to data group /:=name of default html iFile to serve.
Then modified code like that:
if { [HTTP::uri] eq "/" } {
set my_ifile [class match -value "/" equals my_to_serve_files_dg]
} else {
set my_ifile "/Common/[URI::basename [HTTP::uri]]
}
What do you think? Any better simpler way?
Piotr