I am trying to create a redirect irule but is not a standard redirect. It basically needs to take the URL + path and redirect it to another website + the path of the old URL. E.g.
The Url is not always the same therefore it needs to be flexible. Basically apply everything after the “/” to the new URL.
In a situation where there is no path it just execute a normal redirect. below is my attempt which isn’t working, not sure why.
when HTTP_REQUEST {
if { ([string tolower [HTTP::host]] equals “www.abc.com”) and ([HTTP::uri] starts_with “/”) } {
do you have a dump capturing what the BIG-IP is returning? you could also capture the redirect in HTTP_RESPONSE_RELEASE I think. Its working on my end, not sure what the issue is, will need to see what you’re seeing.
We were unable to get the iRule to work, therefore we sent the traffic to an apache server and on the server, we were able to configure the redirect to the right path. Thank you for your help.