Forum Discussion
3 Replies
Sort By
- JRahmAdminHTTP::uri is cached, so you won't see the change in the log unless you add another lower priority (higher number) event for the log statement. 500 is the default priority, so anything higher will show the changed uri in a log statement. If you check the tcpdump, it should meet your expectations on the wire. You could add this to your rule to verify in your local logs:
when HTTP_REQUEST priority 550 { log local0. "Updated URI is [HTTP::uri]" }
- Thanks for the cache priority tip citizen. just to keep this post updated, here is an alternative iRule suggested by f5 for uri modification using variables for the rewrite:
- JRahmAdminWhile you can be assured the magic is happening without logging, there really isn't any validation in that example. If going this route, might as well not set the variable to conserve cycles. Also, more conservative to send one log statement.
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/test" } { HTTP::uri /index.html log local0. "Original URI: [HTTP::uri], New URI: /index.html" } }