Forum Discussion
ecwlam Altostratus
Altostratus
Dec 22, 2022iRule redirection
 May I know how to write the iRule with uri redirection?  https://www.abc.com/aa  --> https://www.abc.com/bb  including the correspoing link under https://www.abc.com/aa  For example:  https://www.abc...
- Dec 23, 2022Hi 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]" } } 
muhamed_elfiky Altocumulus
Altocumulus
Dec 23, 2022Hi 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]"
}
}
ecwlam Altostratus
Altostratus
Dec 28, 2022Thanks, it works well!
- Leslie_HubertusDec 28, 2022Ret. Employee
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