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...
Arie
Altostratus
Jun 24, 2014@Patrik: You've re-introduced the protocol (https) in the comparison. However, HTTP::host contains the host only.
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"
}
}
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