URI iRule Redirect Question
Hello,
I have the below customer request. I was wondering if the below iRule would handle the request properly. If it looks good I'll try it out on Monday. If you have any suggestions, please feel free to make them. I'm just getting into using iRule URI redirects. I have done a few URL redirects successfully.
Customer Request: Redirect www.website.com/points to points.website.com along with all query parameters.
MY NOTE: The query parameters they speak of should contain POINTS, or another I'll call, ABCD in the URI. Are these case sensitive in the iRule? I created the below proposed iRule for this request.
when HTTP_REQUEST { set uri [HTTP::uri] if { ($uri contains "points")} then { HTTP::respond 301 Location "https://points.website.com/"} elseif { ($uri contains "abcd")} then { HTTP::respond 301 Location "https://points.website.com/"}}