Forum Discussion
qqdixf5_74186
Nimbostratus
Apr 01, 2010Internal class format
Is this format valid for v10.0.1.
class namevalue {
{
"name1" { "value1" }
"name2" { "value1" }
}
}
I am ...
L4L7_53191
Nimbostratus
Apr 02, 2010This rule works with the original format I posted above. The idea of the rule is to redirect based on a lookup of the original HTTP::host header value. For example,
with a class like:
class foo {
{
"www.one.com www.foo.com"
"www.two.com www.bar.com"
}
}
The following code:
when HTTP_REQUEST {
set Host [findclass [HTTP::host] dc-post " "]
log local0. "Host var is $Host"
if { $Host ne "" } {
HTTP::redirect http://$Host[HTTP::uri]
}
}
...will lookup the k/v pair where www.one.com or www.two.com are the keys, and redirect to the value (www.foo.com or www.bar.com).
It may be of value to have a look at this post: https://devcentral.f5.com/Default.aspx?tabid=53&view=topic&postid=1144951&forumid=5&tpage=1
-Matt
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