Forum Discussion
JamesLapic_4428
Nimbostratus
Aug 21, 2007Redirect based on Host Header and Hide URI?
I have a pool of web servers that i am trying to accomplish the following on.
- Any traffic directed to app1.example.com would be redirected to app1.example.com/dir1/dir2/index?id=1&lang=0 ...
Chad_Roberts_21
Nimbostratus
Aug 27, 2007HTTP::redirect actually sends a redirect to the client's browser, so with that method you won't be able to get around the user seeing it. You could try simply modifying the URL (specifically, the uri) before forwarding it to the pool, though. It would appear to the user that the path is just "/", which of course is the root directory (default when no path is specified).
when HTTP_REQUEST {
if { ([HTTP::host] == "app1.example.com") and ([HTTP::uri] == "/") } {
HTTP::uri "/dir1/dir2/index?id=1?=0"
}
if { ([HTTP::host] == "app2.example.com") and ([HTTP::uri] == "/") } {
HTTP::uri "/dir1/index?id=1"
}
}When the user clicks additional links or sends a post or something, the URL will be adjusted in the user's browser accordingly, but this would at least hide the first path from the user on initial connection.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects
