Forum Discussion
nitass
Employee
e.g.
when HTTP_REQUEST {
if { [HTTP::host] equals "asites.abc.com" } {
if { [class match [HTTP::uri] starts_with test] } {
HTTP::redirect "http://asites.abc.com[class match -value [HTTP::uri] starts_with test]"
}
}
}
if it still does not work, try to add logging and see what you get.
ShakN_167332
Aug 28, 2014Nimbostratus
i got one more code
log local0. "Incoming URI = [HTTP::uri]"
if { [string tolower [HTTP::uri]] starts_with "/bseu" } {
set uri [string map -nocase {"/bseu" "/sites"} [HTTP::uri]]
log local0. "New URI = $uri"
HTTP::uri $uri
}
}
now client requirement changed, above code is working where it is redirecting all the sites to required uri but client wants 2 sites which is /bseu and /bseu/it should not redirect according to the code. please suggest how this can be achived