Scott_83827
Apr 10, 2012Nimbostratus
Log Not Showing Modified URI
The script below works properly. If the uri contains /hh/ then changes the extention from .cfm to .aspx and sends the request to the MigrationPool pool. So if you go to http://nowhere.com/hh/test.cfm it should send the request to http://nowhere.com/hh/test.aspx. It does this correctly. However, when I log the URI it shows the old URI in the log:
Rule Test1 HTTP_REQUEST: Migration Pool: /hh/news.cfm
I would expect it to say:
Rule Test1 HTTP_REQUEST: Migration Pool: /hh/news.aspx
Any ideas on why it does this?
when HTTP_REQUEST {
if { [HTTP::uri] contains "/hh/" } {
HTTP::uri [string map -nocase {.cfm .aspx} [HTTP::uri]]
log local0. "Migration Pool: [HTTP::uri]"
pool MigrationPool
} else {
log local0. "Current Production: [HTTP::uri]"
pool CurrentProduction
}
}
Thanks,
Scott