Forum Discussion
Sep 18, 2015
BIG-IP : irule not matching uri as expected
F5 BIG-IP Virtual Edition v11.4.1 (Build 635.0) LTM on ESXi This code is logging all requests - including those with uri "/404" : when HTTP_REQUEST {
if {[HTTP::uri] != "/404"} {
log l...
Sriram_87174
Nimbostratus
Sep 18, 2015Are you trying to log the 404 error in the response packet? try using when HTTP_RESPONSE function and see if you can log 404 error.
- Sep 18, 2015/404 is a uri not a response error
- Sriram_87174Sep 18, 2015
Nimbostratus
You can try using HTTP::path instead of HTTP::uri when HTTP_REQUEST { if {[HTTP::path] != "/404"} { log local0. "uri = [HTTP::uri]" } } - Sriram_87174Sep 18, 2015
Nimbostratus
I tried with both HTTP::path and HTTP::uri - It works fine. i am using v11.4.1 BIG IP appliance. - Sep 18, 2015/404 is the entire uri ( no query-params ) so aren't [HTTP::path] and [HTTP::uri] equivalent ?
- Sriram_87174Sep 18, 2015
Nimbostratus
Agree, Yes that is correct you could use either. log the full uri when the request comes in before it goes to the if statement. To verify it is exactly what you expect it to be and then work out why it doesnt not match the expression for /404 ?
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