Alex_3268
Jan 18, 2008Nimbostratus
Performaing complex Apache like rewrites
Hi,
I've been searching and reading this forum and others for information on replacing Apache rewrites with iRules but I'm still somewhat confused as to whether this is entirely possible and if it's even a good idea in the first place.
An example of the type of rewriting we do now is;
RewriteRule ^/([a-z])ws/wfs([a-z]+)_([0-9]+)/(wfs|wms)/(.*)$ \
http://hostname/wfs$2_$3/$4/$5
There are a number of variations on the above. We do this to partially validate the parameters but mainly to provide a consistent uri format across a variety of applications.
From what I've read so far it appears doing this using iRules would be somewhat more complex and require pulling apart the uri, placing the components into variables, doing string matches and probably data group lookups, then putting it all back together?
Is there an easier way (ideally something very similar to Apache)?
Any help or advice would be greatly appreciated.