greenfroguk_338
Nov 07, 2011Nimbostratus
Basic iRule to redirect to pools
Hi,
We have a VIP created and against that VIP have a very basic iRule.
The idea is that depending on two matches on the URI it directs to a different pool. I know there will be a much better way of doing this.
The rule is as follows;
when HTTP_REQUEST { if {[HTTP::uri] contains "e02extport.com" and "var1" } { pool pool_ext_e02_var1 }
elseif
{[HTTP::uri] contains "e02extport.com" and "var2" } { pool pool_ext_e02_var2 }
elseif
{[HTTP::uri] contains "e02extport.com" and "var3" } { pool pool_ext_e02_var3 }
elseif
{[HTTP::uri] contains "e02extport.com" and "var4" } { pool pool_ext_e02_var4 }
else
{pool pool_ext_e02_default} }
the idea beinbg that if the uri contains e02extport and var1 then go here or continue to analyse the rule until you either hit a match and if not then use the default.
now I haven't been able to test it but I have had a report that if the uri is as follows
https://e02port.com/var1/app.html?r...o2port.com
then they tester gets a page can not be found.
if he messes about with the uri and puts in random characters in the ref section so as it breaks up the ref to something like ?ref=https://e02*port.com, or anything that breaks the string up it seems to work.
Two questions really why would the rule logic do that and what can I do to stop it, I am sure there is a better way, access is made via emebedded links in a browser.
Only ever done a single very simple iRule before.
Cheers,
G