Forum Discussion
muzammil_88686
Nimbostratus
Dec 11, 2012Optimizing Multiple URL redirections
Dear Dev Team,
I have a request to redirect the below URLs
www.xyz.com/p/cal2013/m1 to www.xyz.com/w/c/MC/SC/CAL2013/m1
www.xyz.com/p/cal2013/m2 to www.xyz...
Tim_K_92675
Cirrostratus
Dec 13, 2012If all the incoming requested URLs contain consistent uri content, you might be able to use substr to dynamically pull the info you need from the end of the uri. Something like this (untested; just off the top of my head):
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/p/cal2013/" } {
HTTP::redirect www.xyz.com/w/c/MC/SC/CAL2013/[substr [HTTP::uri] 11]
}
}
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