BIG-IP Solutions: URL Redirect Deep Dive
Published Oct 30, 2018
Version 1.0Was this article helpful?
Great question @f5_rock! You can't do a 301 directly with the policy, but it is possible to reuse parts of the path from the original request in the redirect by using a tcl expression in your policy like this:
"tcl:[string map {/path1/ /} [HTTP::uri]]"
You can also call an iRule from policy to do the 301. Yes, this obviates the need for a policy if that's the only function, but if your policy has more functionality than that and you want to keep all the flow logic in the policy, a combo approach is a nice option. Details for 301 redirect in a comment on this thread: