Forum Discussion
Ts67p18
Dec 09, 2020Nimbostratus
Request Redirect
i need to redirect the following:
https://abc.org/prod/items/ebb81b9e-0e6f-4bd8-af22-bf865212e2cd/1/
to
https://cde.edu/ware/lesson/ebb81b9e-0e6f-4bd8-af22-bf865212e2cd/1/
there will be many requests containing different content after "/items/" that will need to be redirected to the new site and i am hoping to do this with one iRule.
is there a way to strip out the "ebb81b9e-0e6f-4bd8-af22-bf865212e2cd/1/" and add it to the new URL?
Hi Ts67p18,
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/prod/items/" } { HTTP::redirect "https://cde.edu/ware/lesson[string map -nocase {/prod/items/ /} [HTTP::uri]]" return } }
- Ts67p18Nimbostratus
thank you i will give this a try
- Ts67p18Nimbostratus
thanks so much, worked the first time
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