Forum Discussion
Can't get my redirect to work !!!
Hi Paul!
Yeah, the initial hosts was a bit strange to begin with and we would have had to fix them with some string manipulations later on anyway in order for normal requests to pass as well.
Let's start with reverting to my original suggestion:
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
log local0. $host
if { $host equals "test.geowessex.com" } {
log local0. "Redirected based on $host"
HTTP::redirect "https://test.geowessex.com/geoserver/"}
elseif { $host equals "test2.geowessex.com" } {
log local0. "Redirected based on $host"
HTTP::redirect "https://vmcrgifme1"
}
}
This rule would require you to hit the VS with either test.geowessex.com or test2.geowessex.com in order to trigger.
Then let's see if you hit the VS when using both of them. Login to the LTM over SSH and run the following command:
tcpdump -nni any host [virtual server ip] and host [your client ip]
Then browse to both domains and make sure that a full handshake is established and data is being sent in both cases.
Please let me know the outcome.
/Patrik
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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