Forum Discussion
Redirect IP request to the name irule
I fixed problem like below and derived advantage from your reccomandations:
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "webserver.test.local" } {
if { [HTTP::uri] equals "/" } {
HTTP::respond 301 Location "https://[HTTP::host]/yyy"
return
}
elseif { not ([HTTP::uri] starts_with "/yyy") } {
HTTP::redirect "https://[HTTP::host]/yyy"
node "10.20.1.15:4443"
}
elseif { ([HTTP::host] starts_with "10.10.10.15") and not ([HTTP::uri] starts_with "/yyy") } {
HTTP::redirect "https://webserver.test.local/yyy"
}
}
But what is the logic behind the return keyword?
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