Forum Discussion
giltjr
Mar 30, 2015Nimbostratus
I think this is causing you problems: "HTTP::uri "/$path[HTTP::uri]"
If they enter "www-acg.bru-hub.comp.com/capacity/" what you are then doing is changing that to "www-acg.bru-hub.comp.com/capacity/capcacity"
I also don't think you need the line "HTTP::header replace Host "www-acg.bru-hub.comp.com"" because the host header should already be that.
I modified what I use to select which pool to go to, which I got the original code from here on Dev Central. However I don't think you need the "HTTP::uri "/$path[HTTP::uri]" code you have:
when HTTP_REQUEST {
switch -glob [HTTP::uri] {
"/capacity/*" {pool Live-CMS-pool; set path "capacity"}
"/track/*" {pool live-TRACK-poolset; path "track"}
default {HTTP::respond 404 content "Application pool $pool does not exist." Mime-Type "text/html"}
}
log local0. "URI is: [HTTP::uri], pool is $pool, host is [HTTP::host]"
}