url redirect with rewrite capability
This is what should happen, when a user types http://bearcub.dev.leo.world.com/lookout the resulting website should be http://lion.dev.leo.world.com/lookout.
but the client wants the resulting url of lion.dev.leo.world.com/lookout to show as http://bearcub.dev.leo.world.com/lookout.
so in effect, the url in the face of the user DOES not change, it still remains the same as the url typed initially by the user which in this case is http://bearcub.dev.leo.world.com/lookout. The final page in the browser page should still have the initial typed url of http://bearcub.dev.leo.world.com/lookout
This Code works, but it does not get me the result of the final url not changing in the browser page.
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] equals "bearcub.dev.leo.world.com" and [string tolower [HTTP::uri]] equals "/lookout" } { HTTP::redirect "http://lion.dev.leo.world.com/lookout" HTTP::header replace Host "bearcub.dev.leo.world.com"
}
}