mohana_322852
Jun 02, 2017Nimbostratus
Need help for redirction of append URI
I have difficulties in redirection- I want to do a redirection abc.com to abc.com/act on both http and https
when HTTP_REQUEST { if {[string tolower [HTTP::host]] equals"abc.com" or [string tolower [HTTP::host]] equals"abc.com"}{
switch -glob [HTTP::path] {
"/*" {HTTP::respond 301 Location " https://abc.com/act[HTTP::uri]"}
} }
Or
when HTTP_REQUEST { if {[string tolower [HTTP::host]] equals"abc.com"}{ if {[HTTP::uri] starts_with "/act" }{ HTTP::uri /act[HTTP::uri] log "hit uri act"} } }
Both rules are not working Kindly give an advice
Thank you