Forum Discussion
arczi45_305574
Nimbostratus
Jun 02, 2017Irule redirection based on /value
Hi;
I have to write an irule to redirect a traffic to new URL based on special value from old URL.
For example:
I have this URL https://website.com/otcsEN/livelink.exe/Open/162269 , at...
Stanislas_Piro2
Cumulonimbus
Jun 02, 2017Hi,
you can use this code:
when HTTP_REQUEST {
if {[scan $uri "/otcsEN/livelink.exe/Open/%d" id] && [string length $id] > 2 && [expr {([string length $id] % 2) != 0}]} {
HTTP::respond 302 Location " https://website2.com/_layouts/15/sharepoint.aspx?q=IDMSObject%3A${id}&v=search"
}
}I configured to filter id with odd length greater than 2 (3, 5, 7, etc). the scan check the ID contains only numbers.
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
