Forum Discussion

Richard_Kim_270's avatar
Richard_Kim_270
Icon for Nimbostratus rankNimbostratus
Aug 15, 2008

Basic iRule redirect help

 

Hello people. I would like to add a line that will detect a url/file for "login.aspx" and redirect it to "default.aspx*". here is my current iRule:

 

 

 

when CLIENT_ACCEPTED {

 

set vmapppool06 [LB::server pool]

 

}

 

when HTTP_REQUEST {

 

switch -glob [string tolower [HTTP::uri]] {

 

"*/report/*" -

 

"*/reports/*" -

 

"*/admin/*" {

 

pool vmqaapppool06_reports

 

}

 

"*/imaging*" -

 

"*/billing*" {

 

pool vmqaapppool06_image

 

}

 

default {

 

pool $vmapppool06

 

}

 

}

 

}

 

1 Reply

  • You could use the following

     
     . 
     . 
     . 
      if { [HTTP::uri] ends_with "login.aspx" } {HTTP::redirect "http://something.anything.com/default.aspx" } 
     

    or

     
     . 
     . 
     . 
      if { [HTTP::uri] ends_with "login.aspx" } {HTTP::uri /default.aspx } 
     

    Hope this helps.

    CB