Forum Discussion
nitass
Mar 05, 2013Employee
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.252:80
ip protocol 6
rules myrule
profiles {
http {}
tcp {}
}
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
if { ( [HTTP::host] equals "subdomain.domain.com" ) and
( [scan [HTTP::path] {/1050/%d/productdata-reviews/reviews.htm} num] == 1 ) } {
HTTP::respond 301 noserver Location "http://domain.com/${num}/"
}
}
}
[root@ve10:Active] config curl -I http://subdomain.domain.com/1050/12345/productdata-reviews/reviews.htm
HTTP/1.0 301 Moved Permanently
Location: http://domain.com/12345/
Connection: Keep-Alive
Content-Length: 0