Robert_LaGrasse
Jul 14, 2006Nimbostratus
Appending address to uri
Stuck this in the wrong forum before...
Probably a very simple task for you iRule gurus out there, not so simple for my first iRule. Here's what I'm trying to accomplish... when the client request comes in to the login.aspx page on my host, I want to append an & or ? and his IP address to the uri. Here's what I've built, which is not working.
when HTTP_REQUEST {
set client [IP::client_addr]
set request [HTTP::uri]
if {$request contains "login.aspx" and $request contains "?"}
{HTTP::uri {$request + "&IPAddress=" + $client}}
elseif {$request contains "login.aspx"}
{HTTP::uri {$request + "?IPAddress=" + $client}}
}
Really nice pseudo code, but obviously not syntactically correct. This results in the F5 sending a GET / $request + "IPAddress=" + $client to my server, which it's obviously not finding. So, how do I fix it?
Thanks!
-B