For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

pvaughan's avatar
pvaughan
Icon for Nimbostratus rankNimbostratus
Jun 05, 2012

help with url redirect ltm v10.2.2

Hi All, I am tryin gto do the following and am having fiddiculty getting it to work.

 

 

 

I want a specific URL lets say http://sitea.com to redirect to a specific path on a web-server that is behind a virtual server, so virtualserver.com/tmtrack/tmtrack.dll?shell=srp but I want users that go to http://virtualserver.com to not be redirect to this page. I have an alias in dns to point sitea.com to the virtual server. The irule I tried looks like this

 

 

 

when HTTP_REQUEST {

 

if { [HTTP::host] equals "serviceportal.intdata.com" }{

 

HTTP::redirect "http://sbm/tmtrack/tmtrack.dll?shell=srpcatalog"

 

}

 

}

 

 

 

Thanks

 

3 Replies

  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus
    pvaughan,

     

     

    You don't actually say what is going wrong with your iRule.

     

     

    Anyway, does this work for you?

     

     

    when HTTP_REQUEST {

     

    if { ([HTTP::host] eq "sitea.com"){ {

     

    HTTP::header replace "Host" "virtualserver.com"

     

    HTTP::uri "/tmtrack/tmtrack.dll?shell=srp"

     

    }

     

    }

     

     

    Hope this helps,

     

    N
  • nathe's avatar
    nathe
    Icon for Cirrocumulus rankCirrocumulus
    Oops, brace the wrong way round on line 2. Sorry.

     

     

    Should be:

     

     

    when HTTP_REQUEST {

     

    if { ([HTTP::host] eq "sitea.com")} {

     

    HTTP::header replace "Host" "virtualserver.com"

     

    HTTP::uri "/tmtrack/tmtrack.dll?shell=srp"

     

    }

     

    }

     

     

    N
  • That doesnt seem to work if the irule is in place or not I keep getting redirect to realserver/tmtrack/tmtrack.dll? not virtualserver/tmtrack/tmtrack.dll?shell=srp, its fine if the realserver comes up in the browser I just need it to point to /tmtrack/tmtrack.dll?shell=srp