katekattar_4936
Mar 04, 2009Nimbostratus
Simple append uri irule
Hi, I need to create a fairly simple irule but am having trouble. Essentially I need to append a different uri depending on the host. Eg.
www.lsc.co.uk should go to www.lsc.co.uk/pdg/lsc
www.lsc.com should go to www.lsc.co.uk/pdg/lsc
www.abc.co.uk should go to www.abc.co.uk/pdg/abc
I have tried this, but am getting a syntax error. What is the best way to do this irule?
when HTTP_REQUEST {
if {[HTTP::host] eq "www.londonsportscare.co.uk"} && {[HTTP::uri] eq "/"} {
HTTP::redirect "http://[HTTP::host]/pdg/london-sports-care"
}
}
Kind Regards
Kate