Forum Discussion
paul_dcc
Nimbostratus
Jun 24, 2014Can't get my redirect to work !!!
Hi All,
I'm trying to get my redirect to work and I'm have some problems, can some one put me right please.
when HTTP_REQUEST {
if { [HTTP::uri] equals "https://test.geowessex.com" } {
HTTP::r...
Jun 24, 2014
Hi Paul!
You're comparing against the full url whereas the uri is the part after the host.
Try this:
when HTTP_REQUEST {
set host [string tolower [HTTP::host]]
if { $host equals "test.geowessex.com" } {
HTTP::redirect "https://test.geowessex.com/geoserver/"}
elseif { $host equals "test2.geowessex.com" } {
HTTP::redirect "https://vmcrgifme1"
}
}
Hope that answers your question. 🙂
/Patrik
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