Forum Discussion
Michael_Yates
Dec 01, 2011Nimbostratus
Hi Phil,
Try this and watch your /var/log/ltm log when it is running to see what is going on inside the iRule and which parts are throwing the 404's.
when HTTP_REQUEST {
if { [string tolower [HTTP::uri]] contains "svn" } {
log local0. "Client [IP::client_addr]:[TCP::client_port] - URI Contains SVN: [HTTP::uri]"
pool tfs_net_8081_pool
}
else {
log local0. "Client [IP::client_addr]:[TCP::client_port] - URI does not contain SVN: [HTTP::uri]"
pool other_pool_to_8080
}
}
when HTTP_RESPONSE {
if { [HTTP::status] == 404 } {
log local0. "Client [IP::client_addr]:[TCP::client_port] gets a [HTTP::status]"
}
}
What will happen in your logs is this:
Dec 1 14:54:40 local/tmm info tmm[4932]: Rule Z.iRule.Development : Client 10.10.10.10:6088 - URI does not contain SVN: /favicon.ico
Dec 1 14:54:40 local/tmm info tmm[4932]: Rule Z.iRule.Development : Client 10.10.10.10:6088 gets a 404
To explain a little more....most browsers will open numerous connections up (usually 5 or so) to get different pieces of content from the server at the same time to speed up the browsing experience. This will help you narrow down (note that this is NOT 100% matching 1 to 1, but it is usually close enough that you can tell within the context of the event) which request failed by matching the Client IP Address and Target Port.
Logging within an iRule is generally the fastest way to figure out what is going on.
Hope this helps.