The main issue I can see is that you are rewriting ALL uri's to "/AAEP/". All requests into the site (including image requests) will be rewritten.
http://www.yyy.mycompany.com/ -> http://zzz.mycompany.com/AAEP/
http://www.yyy.mycompany.com/foobar ->
http://zzz.mycompany.com/AAEP/
http://www.yyy.mycompany.com/image.gif ->
http://zzz.mycompany.com/AAEP/
...
Obviously not what you want to do. Since I have no background on your application, only you can figure out which URI's you need to rewrite. But, odds are you will have to do some sort of conditional test on the value of HTTP::uri before rewriting the URI. With something like the following.
when HTTP_REQUEST {
switch [HTTP::host] {
"www.yyy.mycompany.com" {
HTTP::header replace "Host" "zzz.mycompany.com"
switch -glob [HTTP::uri] {
"/" -
"/index.html" -
"/default.aspx" {
HTTP::uri "/AAEP/"
}
}
}
}
}
One more thing, if you are only comparing one value for the host, an IF statement might be easier to read. There isn't much performance gain on a switch when you are only doing one comparison.
when HTTP_REQUEST {
if { [HTTP::host] equals "www.yyy.mycompany.com" } {
HTTP::header replace "Host" "zzz.mycompany.com"
switch -glob [HTTP::uri] {
"/" -
"/index.html" -
"/default.aspx" {
HTTP::uri "/AAEP/"
}
}
}
}
Hope this helps...
-Joe