Forum Discussion
DNSgeek_90802
Nimbostratus
Dec 28, 2009modifying HTTP::uri not working?
I have an irule that needs to modify the URI of a request before it passes it to a pool of squid servers. What I have is:
when HTTP_REQUEST {
if { $::DEBUG }{
...
hoolio
Cirrostratus
Dec 28, 2009You haven't actually set the URI to the new value though. If you just want to log the update, you could use this:
when RULE_INIT {
set ::DEBUG 1
}
when HTTP_REQUEST {
if { $::DEBUG }{
log local0. "Original URI: [HTTP::uri]
}
HTTP::uri [string trimright [HTTP::uri] .html]
}
when HTTP_REQUEST priority 501 {
This event runs after the prior HTTP_REQUEST event at the default priority of 500
Remove or comment out this event once done testing
if { $::DEBUG }{
log local0. "Updated URI: [HTTP::uri]
}
}
Aaron
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
