Forum Discussion
New to iRULES and F5 -- URL rewrite question
Handed responsibility of managing our F5s and trying to write the following rewrite either with iRules or HTTP Class Profile, we are running 11.3
If https://xxx.xxx.ourdomain.com/ABCGamePlay/?softwareid=302221-01-001&RealPlay=0&countrycode=NA&language=en&nogsoperatorid=123 This should redirect to https://xxx.xxx.ourdomain.com/DEFGamePlay/?softwareid=302221-01-001&RealPlay=0&countrycode=NA&language=en&nogsoperatorid=123
Not sure if i have to include the full URI in the rewrite or just the first part /ABCGamePlay to DEF/GamePlay
2 Replies
- Kevin_Stewart
Employee
Try this:
when HTTP_REQUEST { if { [string tolower [HTTP::uri]] starts_with "/abcgameplay" } { set uri [string map -nocase {"/abcgameplay" "/defgameplay"} [HTTP::uri]] HTTP::redirect "https://[HTTP::host]${uri}" } } - Zangfro_170494
Nimbostratus
Kevin,
Thank you for the quick response, I'm trying to get up to speed on all this
I'll go ahead and give this a try.
Appreciate it.
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