Redirect IP request to the name irule
Hello friends.
I am experiencing with the issue that I can not handle.
I wrote irule that when someone send request to the f5 by using its IP address like https://10.10.10.15/xxx, redirect it to page https://webserver.test.local/yyy.
But it does not work.
I don`t know whether irule is true or not.
My aid is users to give access only over domain name.
IP address requests should be redirect to the domain name as well.
when HTTP_REQUEST {
if { [string tolower [HTTP::host]] equals "webserver.test.local" } {
if { [HTTP::uri] equals "/" } {
HTTP::respond 302 Location "https://[HTTP::host]/yyy/"
}
elseif { not ([HTTP::uri] contains "yyyy") } {
HTTP::respond 302 Location "https://[HTTP::host]/yyy"
}
elseif { ([HTTP::host] contains "10.10.10.15") } {
HTTP::redirect "https://[HTTP::host]/yyy"
}
node "10.20.1.15:4443"