Forum Discussion
NhatMinh-TSV_18
Nimbostratus
Jan 28, 2015Convert rule on Apache to iRule
Hi all,
I have a customer using apache to load balancing, on this device, they have a rule
^/thongtin/([0-9]+)/(.*)/?$ /wps/portal/abc/newsdetails?newsId=$1 [L,PT]
Plz help me to change ...
Michael_Jenkins
Cirrostratus
Jan 29, 2015My suggestion would be to check out the iRules 101 articles to help learn how best to build iRules, and then look at the tcl scan command to parse your URI (Regex can be costly on resources, so only use it when you need to).
From there, you should be able put together an iRule that meets your needs. Looks like your requirements are any URI that matches
^/thongtin/([0-9]+)/(.*)/?$ needs to go to /wps/portal/abc/newsdetails?newsId=$1, where $1 is what's found in the [0-9]+ part of the uri.
If you have trouble writing the iRule, I can try to help you out.
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