Forum Discussion
iRule redirection
- Dec 23, 2022
Hi ecwlam
you can use this IRule:
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/aa/"} {
HTTP::uri [string map {"/aa/" "/bb/"}[HTTP::uri]]
HTTP::redirect "[HTTP::uri]"
}
}
Hi ecwlam
you can use this IRule :
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/aa"}{
HTTP::redirect https://[HTTP::host]/bb
}
}
- ecwlamDec 22, 2022
Altostratus
Thanks for your reply, it works with https://www.abc.com/aa --> https://www.abc.com/bb
However, the corresponding link does not work
it will redirect from https://www.abc.com/aa/xxx/yyy --> https://www.abc.com/bb
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
