apache rewrite PT to iRules
Hello,
Newbie on iRules here seeking help from you gurus.
I want to move this apache functionality to the Big-IP using iRules but I don't even know how to begin searching devcentral. I tried looking for it and the closest I think the equivalent is the STREAM profile. Tried it but of course it didn't work. Maybe I just don't understand STREAM profile.
This is the apache config:
RewriteEngine on
RewriteCond %{HTTP_HOST} test.domain.com$
RewriteRule ^/*(.+) /web/foo/$1 [PT]
tomcat backend
JkMount /* instance21
What this does:
1. My documentRoot is from the tomcat app servers serving /* - hence the jkmount /* function.
2. The rewrite lines /web/foo/$1 means that when someone goes to http://test.domain.com/web/foo/* data is fetched from tomcat (because it's part of the /* jkmount function) but the display on the browser address bar will remain http://test.domain.com/ instead of http://test.domain.com/web/foo/anyfile.html
Likewise, when users surf http://test.domain.com/web/foo/file.html the display URL will be re-written to http://test.domain.com/file.html
Thanks in advance for any info.