Forum Discussion
DNSgeek_90802
Nimbostratus
Dec 28, 2009Get HTTP::uri in HTTP_RESPONSE
I have an irule that needs to get the URI from a 404 page and muck with it. However, when I try to reference [HTTP::uri], I get told that I cannot access it from the HTTP_RESPONSE context.
...
hoolio
Cirrostratus
Dec 28, 2009You can save the HTTP::uri value in HTTP_REQUEST to a variable and then reference that in HTTP_RESPONSE:
when HTTP_REQUEST {
Save the URI
set uri [HTTP::uri]
}
when HTTP_RESPONSE {
Check if response was a 404
if {[HTTP::status] == 404}{
log local0. "[IP::client_addr]:[TCP::client_port]: 404 received from $uri"
}
}
Aaron
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