Forum Discussion
nitass_89166
Aug 25, 2014Noctilucent
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_167332Aug 26, 2014Nimbostratusi added the logging in irule but how to check the logs where the client ip is hitting the irule and redirection is taking place. PLease let me know the cmds to troubleshoot.
- ShakN_167332Aug 28, 2014Nimbostratusi 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
- ShakN_167332Sep 04, 2014Nimbostratushi can any one give me alternative code for my requirement.