Forum Discussion

Dassy_165659's avatar
Dassy_165659
Icon for Nimbostratus rankNimbostratus
Aug 04, 2014

How to write redirect a URL with all except one

Hi,

 

I want to write an iRule with following requirements

 

I have two application servers with one URL & that serves as follows 1-http://xyz.com/ (one application) 2-http://xyz.com/abc(2nd application URL)

 

Now my requirement is all request with /abc should go to abc app server but except /abcredirect.jsp AND the /abcredirect.jsp should go to http://xyz.com/

 

Thanks & waiting for your help Parthasarathi Dash

 

1 Reply

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus

    Would this work? Have a default pool for xyz.com attached to the VS and another pool called abc_app (for example) with the abc app server in it.

    when HTTP_REQUEST { 
       switch -glob [string tolower [HTTP::uri]]  { 
          "/abcredirect*" { 
            HTTP::uri "/" 
            } 
          "/abc*" {
            pool abc_app
            }
        } 
    } 
    

    Hope this helps,

    N