Forum Discussion
Perch_261628
Nimbostratus
Apr 28, 2016iRule question?
I'm trying to write an iRule that take a shorter URL and expand it while adding the last 9 characters to the end of it.
So as an example when someone browses to:
http://website.ca/admn/0123...
Stefan_Klotz
Cumulonimbus
Apr 29, 2016Hi Perch,
I would try it with this one:
when HTTP_REQUEST {
option1
set user_id [findstr [HTTP::uri] "/admn/" 6]
option2
set user_id [getfield [HTTP::uri] "/" 3]
HTTP::respond 301 Location "https://website.ca/AppXtender/ISubmitQuery.aspx?DataSource=BPROD&appname=UM-S-ADMN&ID=$user_id"
}
Ciao Stefan 🙂
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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