Forum Discussion
OTS02
Cirrus
Aug 19, 2015Is it possible to use an LTM Policy for sending 301 redirects?
Am experimenting with Policies. Hoping it is possible to send 301 redirects with a Policy.
Stanislas_Piro2
Cumulonimbus
Sep 11, 2015Hi,
If you want to define redirect from Local traffic policy, you can add a tcl variable in policy rule and add this irule executing the redirect...
Redirect from Local Traffic Policy
to use it, create an action
tcl set variable
- name : Redirect
- expression : Redirect URL
when HTTP_REQUEST {
if {([info exists "Redirect"])} {
HTTP::respond 301 Location $Redirect
return
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects