Forum Discussion
mikey_webb
Cirrus
Mar 31, 2021irule to redirect a uri
i have a redirect based on country which works www.abc.com if in uk redirects to uk.abc.com I need to redirect but also to retain a catalogue number that is unique for different products so for exam...
spalande
Nacreous
Apr 02, 2021Try following if you want to have clienside redirect
if { [HTTP::uri] starts_with "/book/catalogue" } {
set newuri "/catalogue/book[string range [HTTP::uri] 15 end]"
HTTP::respond 301 Location "https://uk.abc.com$newuri"
return
}
If you want to have a rewrite on the serverside and shouldn't be visible to the client browsers
if { [HTTP::uri] starts_with "/book/catalogue" } {
set newuri "/catalogue/book[string range [HTTP::uri] 15 end]"
HTTP::uri $newuri
return
}
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