Forum Discussion
nitass
Aug 24, 2014Employee
e.g.
config
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm virtual bar
ltm virtual bar {
destination 172.28.24.10:80
ip-protocol tcp
mask 255.255.255.255
pool foo
profiles {
http { }
tcp { }
}
rules {
qux
}
source 0.0.0.0/0
source-address-translation {
type automap
}
vs-index 70
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm data-group internal redirect_class
ltm data-group internal redirect_class {
records {
asites.abc.com/xyz/budget {
data http://asites.internet.abc.com/sites/budget
}
asites.abc.com/xyz/finance {
data http://asites.internet.abc.com/sites/finance
}
}
type string
}
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm rule qux
ltm rule qux {
when HTTP_REQUEST {
log local0. "\[HTTP::host\] is [HTTP::host]"
log local0. "\[HTTP::uri\] is [HTTP::uri]"
log local0. "\[class match -- [HTTP::host][HTTP::uri] equals redirect_class\] is \
[class match -- [HTTP::host][HTTP::uri] equals redirect_class]"
if { [class match -- [HTTP::host][HTTP::uri] equals redirect_class] } {
log local0. "\[class match -value [HTTP::host][HTTP::uri] equals redirect_class\] is \
[class match -value [HTTP::host][HTTP::uri] equals redirect_class]"
HTTP::redirect [class match -value [HTTP::host][HTTP::uri] equals redirect_class]
}
}
}
test
[root@centos1 ~] curl -I http://asites.abc.com/xyz/finance
HTTP/1.0 302 Found
Location: http://asites.internet.abc.com/sites/finance
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@centos1 ~] curl -I http://asites.abc.com/xyz/budget
HTTP/1.0 302 Found
Location: http://asites.internet.abc.com/sites/budget
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
/var/log/ltm
[root@ve11a:Active:In Sync] config tail -f /var/log/ltm
Aug 24 06:33:34 ve11a info tmm[29362]: Rule /Common/qux : [HTTP::host] is asites.abc.com
Aug 24 06:33:34 ve11a info tmm[29362]: Rule /Common/qux : [HTTP::uri] is /xyz/finance
Aug 24 06:33:34 ve11a info tmm[29362]: Rule /Common/qux : [class match -- asites.abc.com/xyz/finance equals redirect_class] is 1
Aug 24 06:33:34 ve11a info tmm[29362]: Rule /Common/qux : [class match -value asites.abc.com/xyz/finance equals redirect_class] is http://asites.internet.abc.com/sites/finance
Aug 24 06:33:46 ve11a info tmm1[29362]: Rule /Common/qux : [HTTP::host] is asites.abc.com
Aug 24 06:33:46 ve11a info tmm1[29362]: Rule /Common/qux : [HTTP::uri] is /xyz/budget
Aug 24 06:33:46 ve11a info tmm1[29362]: Rule /Common/qux : [class match -- asites.abc.com/xyz/budget equals redirect_class] is 1
Aug 24 06:33:46 ve11a info tmm1[29362]: Rule /Common/qux : [class match -value asites.abc.com/xyz/budget equals redirect_class] is http://asites.internet.abc.com/sites/budget
- ShakN_167332Aug 24, 2014Nimbostratusam trying to create a data group in my device which is running 10.2.4 build 817 can you please help help how to configure in this. of else cli cmd for tmsh.