Forum Discussion

Priyantha_34591's avatar
Priyantha_34591
Icon for Nimbostratus rankNimbostratus
Jan 11, 2019

re-write based on header evaluation (no redirect)

we need to do an i rule that evaluates the following requester uri = A Re-write uri =B

 

when request is made to A and meets below criteria $HOST contains "xxx.xxxx.net" and (($URI contains "default.aspx?id=d") or ($URI contains "d.aspx?id=d" the request needs to be re-written to B

 

1 Reply

  • when HTTP_REQUEST {
        if { [HTTP::uri] == "uritocheck" && [HTTP::host] contains "xxx.xxxx.net" } {
            HTTP::uri /newuri
        }
    }
    

    You could also do a redirect with HTTP::redirect