Forum Discussion
Leslie_South_55
Nimbostratus
Oct 19, 2007findclass AND external class AND wildcards
I am using an external class file to do URI redirects, when using speciffic URI matching it works fine: when HTTP_REQUEST {
log local0. "Uri is [HTTP::uri]"
set NewURI [findclass [HTTP::uri]...
Leslie_South_55
Nimbostratus
Oct 22, 2007I modified your sample to look like this
when HTTP_REQUEST {
log local0. "URI is [HTTP::uri]"
foreach line $::wwwredirects {
if {[HTTP::path] starts_with [getfield $line " " 1]}{
HTTP::redirect "http://[getfield $line " " 2]"
log local0. "redirecting to http://[HTTP::host][HTTP::uri]"
}
}
and the only log entry I get is
Oct 22 15:23:57 tmm tmm[25714]: Rule rule_wwwredirecttest : URI is /accounts/orders
and then a 404 error.
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
