07-Aug-2020 09:59
Dear all
My question is how can I redirect a user to a domain if he uses an IP instead of the domain.
Example: http:10.10.10.15//Default.aspx?tabid=110 Redirect to https://education.mm//Default.aspx?tabid=110
At this time: we have use 2 irule:
But. when we use ip instead of the domain. we can not rediect to domain
when HTTP_REQUEST
if { ([HTTP::host] contains "10.10.10.15")
HTTP::redirect "https://education.mm"
}
but it is not work.
Please help us.
Thanks all
07-Aug-2020
13:17
- last edited on
04-Jun-2023
21:20
by
JimmyPackets
Hi Hoang Hung,
Can you try this rules?
iRule for http VS:
when HTTP_REQUEST {
HTTP::redirect "https://education.mm[HTTP::uri]"
}
iRule for https VS:
when HTTP_REQUEST {
if { [HTTP::host] equals "10.10.10.15" } {
HTTP::redirect "https://education.mm[HTTP::uri]"
}
}
07-Aug-2020 20:01
Thanks eaa
I will try it.
Thanks
Hung Hoang
10-Feb-2023 09:41
I am looking to do a similar solution and wanted to check if the solution given by Enes worked or not.