Forum Discussion
TMaCEvans_92750
Nimbostratus
Aug 16, 2011converting regex to irule
i'm wondering if its possible to carry out the below rules below in an irule?
article page: match url="^([A-Za-z\-]+)/([A-Za-z\-0-9.]+)/([0-9]+)(/)" url="Full_Article.aspx?art_id={R:3}"
...
TMaCEvans_92750
Nimbostratus
Aug 25, 2011I've managed to get all the rules working accept for this one
category archive page: match url="^Archive/([A-Za-z\-0-9.]+)/([0-9]+)/([0-9]+)(/)" url="archive.aspx?cat_id={R:2}&pg={R:3}
} elseif { [scan [HTTP::uri] {/Archive/%[A-Za-z\-0-9.]/%[0-9]/%[0-9]} s1 s2 s3] == 3 } {
scan [HTTP::uri] {/Archive/%[A-Za-z\-0-9.]/%[0-9]/%[0-9]} s1 s2 s3
log -noname local0. "$s1 $s2 $s3"
HTTP::respond 301 Location "http://[HTTP::host]/archive.aspx?cat_id=$s2&pg=$s3"
I'm not sure how to simulate the (+) as when i try add it in i get the following error on the f5
Aug 25 11:15:12 local/tmm err tmm[5040]: 01220001:3: TCL error: NewsRegex - bad scan conversion character "(" while executing "scan [HTTP::uri] {/Archive/%([A-Za-z\-0-9]+)/%([0-9]+)/%[0-9]} s1 s2 s3"
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