Forum Discussion
ppphatak_127926
Nimbostratus
Sep 07, 2005findclass function doesnt work
I have a class called "myclass" having two members.
www.test1.com,www.yahoo.com
www.test2.com,www.msn.com
and wish to run this single rule against it.
redirect to getfiel...
Martin_Machacek
Sep 21, 2005Historic F5 Account
Correct, and it actually works that way in my tests. I'm using following config:
class hostmap {
"test1.mm.lab,fernet.mm.lab"
"test2.mm.lab,gin.mm.lab"
"test3.mm.lab,rum.mm.lab"
}
rule mapper {
redirect to "http://" + getfield(findclass(http_host, hostmap), ',', 2) + http_uri
}
virtual 10.66.66.162:80 unit 1 {
use rule mapper
}
Sending following request to the VIP:
GET /host.html HTTP/1.1
Host: test1.mm.lab
yields following response:
HTTP/1.0 302 Found
Location: http:///host.html
Connection: close
If I access the VIP with Firefox I get an Alert saying "www.host.html cannot be found, please check the URL and try again" and a blank window. This is what I expect because the URL in the Location header is really invalid.
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