Forum Discussion

kykong_107132's avatar
kykong_107132
Icon for Nimbostratus rankNimbostratus
Jul 14, 2005

I rules to add backslash

Hi All,

 

 

I have a requirement where by if someone enter www.abc.com/main, i want to use irules to append a backslash on behind, www.abc.com/main/.

 

 

below is my sample rule

 

 

========================================

 

if (http_uri == "main") {

 

redirect to "http://%h/main/"

 

}

 

else {

 

use pool web

 

}

 

========================================

 

 

but it seem like doesn't work. anyone can provide some help.

 

 

thank.
  • The uri starts with the beginning slash. Change your if to

    if (http_uri == "/main") {
    and see if that does it for you.

    -Joe