Forum Discussion

MikeB_61012's avatar
MikeB_61012
Icon for Nimbostratus rankNimbostratus
Mar 22, 2012

Need Assistance creating a HTTP Redirect

I am new to writing IRules, and I cannot get an IRule to work. I have downloaded the IRule editor, but it is not helping me resolve what my problem is. I believe it is just my syntax. Could someone please let me know what I have written incorrectly?

 

 

when HTTP_REQUEST { if { [HTTP::host] eq https://dev11i.kci1.com:13003/servl...OTAInbound } { HTTP::redirect "https://dev11i.kci1.com:13003/webservices/ECXOTAInbound" } }
  • Hi Mike,

    see below

     when HTTP_REQUEST {
    
    if { [HTTP::host] eq "dev11i.kci1.com" and [HTTP::uri] eq "/servlets/oracle.apps.ecx.oxta.ECXOTAInbound" } { 
    HTTP::redirect "https://dev11i.kci1.com:13003/webservices/ECXOTAInbound" 
    } 
    }

    Thanks

    Christian

  • Koenning,

     

     

    Thank you for the reply. Although, when I test, I am not being redirected. I just receive the page cannot be found and the original URL is still listed in my browser. Does it have something to do with the :13003 that is part of the URL? I have verified that the new destination page is correct. Once I create the IRule, all that I need to do is apply it to the IRule section of the Virtual Server, right?
  • Can you test from LTM using curl to see what you're getting back?

     

     

    curl -v 1.1.1.1/servlets/oracle.apps.ecx.oxta.ECXOTAInbound -H "Host: dev11i.kci1.com"

     

     

    Aaron