Forum Discussion
Puli
Nimbostratus
Apr 15, 2011matching numbers patter in a url
I need to match below patter in a url and re-direct traffic.
http://www.abc.com/temp/2011/12/temp.html
Am using below code
if { [string match {*/*[0-9]*/*[0-9]*/* } [HTT...
Puli
Nimbostratus
May 10, 2011Hi aaron,
i fixed it, i had a wildcard in front that matching all characters followed by numbers. Below is the modified one
From
if { [string match "*/*\[0-9\]*/*\[0-9\]*/*" [HTTP::uri] } {
to
if { [string match "*/\[0-9\]*/*\[0-9\]/*" [HTTP::uri] } {
I had to match only url of specific type
http://www.abc.com/temp/[digits]/[digits]/temp.html
thanks for the support.
Appreciate it.
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