iRule: modifying the uri without a redirect
Published Jul 27, 2005
Version 1.0Was this article helpful?
when HTTP_REQUEST {
if { [string toupper [HTTP::query]] contains "TRIGGER" } {
if { not ([HTTP::uri] starts_with "/new/dir") } {
HTTP::uri /new/dir[HTTP::uri]
}
HTTP::uri [HTTP::uri]&key=secret
HTTP::redirect http://localhost[HTTP::uri]
}
}
In the above example, I would expect a request for /?TRIGGER to return a redirect to http://localhost/new/dir/?TRIGGER&key=secret but instead, it returns a redirect for /?TRIGGER, clearly not modifying the [HTTP::uri] at all.