Forum Discussion

pt_73812's avatar
pt_73812
Icon for Nimbostratus rankNimbostratus
Jan 26, 2010

dash in URI breaking pool selection?

Hello all,

 

 

I've run into a problem with an irule I'm working on. Basically, if there is a dash in the uri, the rule does not seem to pick it up correctly unless there's a trailing slash at the end of the uri. This is a snippet of the code I'm working with:

 

 

when HTTP_REQUEST {   
       if { [HTTP::path] equals "/" } {   
         pool unix_servers   
   } elseif { [string tolower [HTTP::uri]] starts_with "/tv/my-link" } {    
   pool windows_servers   
   } elseif { [string tolower [HTTP::uri]] starts_with "/tv" } {   
   pool unix_servers   
   } else {   
           pool windows_servers     
            }       
      }   
    

 

 

Now, if I go to http://www.xyz.com/tv/my-link in my browser, not only am I not being sent to the windows pool, but the url that shows up in the browser is http://www.xyz.com/tv

 

If I go to http://www.xyz.com/tv/my-link/ I get sent to the correct windows pool and get the correct content.

 

 

Can I not have a dash in the uri? Or is something else causing the problem?

12 Replies