BIG-IP Solutions: URL Redirect Deep Dive
Check out our "BIG-IP Solutions" series where we will dive into all kinds of cool features related to the BIG-IP. In this edition, I'll take a deeper look at URL redirects using policies instead of ...
Published Oct 30, 2018
Version 1.0ltwagnon
Ret. Employee
Joined May 15, 2019
ltwagnon
Ret. Employee
Joined May 15, 2019
ltwagnon
Oct 31, 2018Ret. Employee
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: