Forum Discussion
uri redirect
Hi Dears, will really appreciate your support in this.
I want to redirect a keyword and let the whole uri / URL remain as it is. for example keyword superb when found anywhere in uri then it should be redirected to same uri with replaced keyword with wonderful. It should be redirect instead of rewrite. I have tried some options but it redirects to same uri.
if { [HTTP::path] contains "/superb/" } {
HTTP::redirect "https://www.hypecolors.ae/en/wonderful/default.aspx"
Thanks.
2 Replies
- Brad_Parker
Cirrus
Give this a whirl:
when HTTP_REQUEST { if { [string tolower [HTTP::path]] contains "/superb/"}{ HTTP::respond 302 noserver Location "https://[HTTP::host][string map -nocase {superb wonderful} [HTTP::path]]" } } - JeffRay_129268
Nimbostratus
Excellent Brand, it worked like a magic. Bundle of thanks for your outstanding solution. :).
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