Forum Discussion

skkg_111590's avatar
skkg_111590
Icon for Nimbostratus rankNimbostratus
Dec 23, 2010

need help with irule

Hi all,

 

I am trying to develop a new iRule. I have built this below but cannot figure why its not working.

 

 

when HTTP_REQUEST {

 

if { [HTTP::uri] starts_with "/"} {

 

HTTP::redirect

 

}}

 

 

The requirement is to check if there is NO URI and append "/pls/htmldb/f?p=330". If there is a URI then do nothing.

 

 

Thoughts?

2 Replies

  • Hi,

    All relative URIs will start with /. I think you want to match just URIs equal to /:

    
    when HTTP_REQUEST {
       if { [HTTP::uri] eq "/"} {
          HTTP::redirect "http://[HTTP::host]/pls/htmldb/f?p=330"
       }
    }
    

    Aaron
  • Thanks I tested this and look like its all working.

     

    Thanks for the help.