Forum Discussion
hooleylist
Nov 13, 2008Cirrostratus
What are the symptoms of the problem you're seeing with the last rule? Which requests are not being rewritten correctly? What are they being rewritten to?
I think this might be what you're looking for:
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: New request to : [HTTP::uri]"
switch [HTTP::path] {
"/" { HTTP::path "/member" }
"/bp" { HTTP::uri "/member?cid=[HTTP::uri]" }
"/eb-member-earAdmin" -
"/admin" -
"/adminTool" {
HTTP::respond 404 content "\
RESOURCE NOT FOUND"
}
}
}
when HTTP_REQUEST priority 501 {
Log a debug statement in a rule event with a different priority so the HTTP::uri value isn't cached.
This event can be removed after testing.
log local0. "[IP::client_addr]:[TCP::client_port]: Modified URI: [HTTP::uri]"
}
What were you trying to do with the case below? It's rewriting the path to the same as it was when requested:
"/tooljournals" { HTTP::path "/tooljournals" }
Also, if you want to use the same action for multiple cases, you can add them with hyphens as shown above for /eb-member-earAdmin, /admin and /adminTool.
Aaron