Forum Discussion
stan_peachey_86
Cirrus
Mar 04, 2010iRule: problem modifying uri without a redirect
I'm attempting to do a simple uri modify without a redirect and nothing changes:
when HTTP_REQUEST {
if { ([HTTP::uri] starts_with "/aaa/bbb/CCC/") } {
HTTP::ur...
JRahm
Admin
Mar 04, 2010While you can be assured the magic is happening without logging, there really isn't any validation in that example. If going this route, might as well not set the variable to conserve cycles. Also, more conservative to send one log statement.
when HTTP_REQUEST {
if { [HTTP::uri] starts_with "/test" } {
HTTP::uri /index.html
log local0. "Original URI: [HTTP::uri], New URI: /index.html"
}
}
If you want to handle the case issues, (ie, user1 enters /test, but user2 enters /Test), use the string tolower command.
HTH...Jason
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
