16-Dec-2020 23:13
Hello,
I would need to do the following with an iRule. Any ideas are appreciated! Basically I need to know how to retrieve the original host in the request and add it to the end in the redirect.
https://www.abc.com/xxx redirected to -> www.xyz.com/portal/dsds?=https://www.abc.com/xxx
Thanks
Teemu
Solved! Go to Solution.
17-Dec-2020 00:36
when HTTP_REQUEST {
HTTP::redirect https://www.xyz.com/portal/dsds?=https://[HTTP::host][HTTP::uri]
# OR:
# HTTP::respond 301 Location https://www.xyz.com/portal/dsds?=https://[HTTP::host][HTTP::uri]
}
Also, you can achieve the same with a local traffic policy.
17-Dec-2020 00:36
when HTTP_REQUEST {
HTTP::redirect https://www.xyz.com/portal/dsds?=https://[HTTP::host][HTTP::uri]
# OR:
# HTTP::respond 301 Location https://www.xyz.com/portal/dsds?=https://[HTTP::host][HTTP::uri]
}
Also, you can achieve the same with a local traffic policy.
17-Dec-2020 02:03
Thanks! It was so simple : )
-teemu
17-Dec-2020
07:37
- last edited on
24-Mar-2022
01:31
by
li-migration
Please mark the thread as solution provided if its resolved.