Forum Discussion
HTTP::uri "/new-page[HTTP::uri]" without pool specified
when HTTP_REQUEST {
if {[HTTP::host] ends_with .com and [HTTP::path] equals /} {
HTTP::uri "/new-page[HTTP::uri]";
}
xxxxx-other irule logic-xxxx
}
}
there is no pool in the first if statment because I want the following irule match the "1.com/?xyz" request.,what will happen to the call 1.com/ if it is matched in the xxxxx-other irule logic-xxxx?
I tried make a log in xxxxx-other irule logic-xxxx for /new-page*,it mess up the irule
"/new-page*" {
log local.0 "[HTTP::uri]"
}
1:what is the correct way achieve HTTP::uri "/new-page[HTTP::uri]" in this case?
I made some logs ,I found that the request changed to /new-pagexxx ,when it is evluated by xxxxx-other irule logic-xxxx,is it an expected behavior?
yes, i believe so.
- nitass_89166Noctilucent
sorry but what do you want to achieve?
- Robert_47833Altostratussorry,I made noise here ,haha I want to let irule change the HTTP::uri ,but don't put pool syntax in this piece,because I want xxxxx-other irule logic-xxxx to handle it ,and sent request to pool. HTTP::uri "/new-page[HTTP::uri]" I made some logs ,I found that the request changed to /new-pagexxx ,when it is evluated by xxxxx-other irule logic-xxxx,is it an expected behavior?
- nitassEmployee
sorry but what do you want to achieve?
- Robert_47833Altostratussorry,I made noise here ,haha I want to let irule change the HTTP::uri ,but don't put pool syntax in this piece,because I want xxxxx-other irule logic-xxxx to handle it ,and sent request to pool. HTTP::uri "/new-page[HTTP::uri]" I made some logs ,I found that the request changed to /new-pagexxx ,when it is evluated by xxxxx-other irule logic-xxxx,is it an expected behavior?
- nitass_89166Noctilucent
I made some logs ,I found that the request changed to /new-pagexxx ,when it is evluated by xxxxx-other irule logic-xxxx,is it an expected behavior?
yes, i believe so.
- Robert_47833Altostratusand if the syntax in xxxxx-other irule logic-xxxx is : "/new-pagexxxx" { log lcoal0. "[HTTP::uri]" } in log,I can see request is matched by this piece syntax,but page is down, This behavior confused me..... help me,Nitass
- nitassEmployee
I made some logs ,I found that the request changed to /new-pagexxx ,when it is evluated by xxxxx-other irule logic-xxxx,is it an expected behavior?
yes, i believe so.
- Robert_47833Altostratusand if the syntax in xxxxx-other irule logic-xxxx is : "/new-pagexxxx" { log lcoal0. "[HTTP::uri]" } in log,I can see request is matched by this piece syntax,but page is down, This behavior confused me..... help me,Nitass
- nitassEmployee
"/new-pagexxxx" {
log lcoal0. "[HTTP::uri]" }is this correct syntax? can you post the irule?
tmsh list ltm rule (name)
- Robert_47833Altostratus
if {[HTTP::host] ends_with ".com" and [HTTP::path] equals "/"} { HTTP::uri "/new-page[HTTP::uri]" } xxxxxxxxxxxxxxxxxxother-irule-logic--------------------- if {[HTTP::path] starts_with "/new-page"} { log local0.alert "[HTTP::uri]" } xxxxxxxxxxxxxxxxxxother-irule-logic---------------------
- nitassEmployeei do not see anything obviously wrong in the irule. is the page down because of the irule? was there any error in /var/log/ltm? have you tried tcpdump when the problem was happening?
- Robert_47833AltostratusI am confused .if I put syntax outside the default syntax if {[HTTP::path] starts_with "/new-page"} { log local0.alert "[HTTP::uri]" } the page is up but if I use it in a switch with a default action, "/new-homepage*" { log local0.alert "hellohello [HTTP::uri]" } default { pool xxxx return } } } it is down. no other reason to make it down,only irule.
- Robert_47833Altostratusah,maybe it works in this way: when the syntax is out of the switch -glob [HTTP::path] which has default pool,this request will be distributed to this default pool since no match in previous condition. but if I evulate it in this switch -glob [HTTP::path] which has default pool,it will not be distributed to default rule,so LB failed....
Recent Discussions
Related Content
* 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