Forum Discussion
mikey_webb
Cirrus
Nov 10, 2017rewrite - help needed
i have a VS which runs 2 different sites with different host headers: abc.co.uk and def.co.uk. i want to ensure that the users never see the real redirect url for def.co.uk and normally a rewrite pro...
Kevin_Stewart
Employee
Nov 10, 2017If you redirect the user to abc.co.uk, the browser will update to reflect that.
If you want the address bar to stay def.co.uk, you can't redirect the user. Rather, you'd need to do the redirection locally. For example:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "def.co.uk" } {
change the Host header on the way to the server (as needed)
HTTP::host "abc.co.uk"
send to the def.co.uk pool
pool def_pool
if the URI is empty, redirect to /app/login
if { [HTTP::uri] equals "/" } {
sends a relative 302 redirect to the user
HTTP::redirect "/app/login"
}
}
}
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
