Forum Discussion

dlogsdonmd's avatar
dlogsdonmd
Icon for Nimbostratus rankNimbostratus
Feb 14, 2013

Redirect Entire URL via iRule

Hello,

 

I'm pretty much an iRule novice and have a little more than beginner level skills with F5 in general, just to give a tiny background.

 

 

I'm needing to create an iRule to redirect an entire URL (is what my boss tells me and he has more experience than I).

 

The URL to redirect is: http://accscientificsession.cardiosource.org/ACC/acc13

 

The location we want poeple to end up at is: http://destination.cardiosource.org

 

Would this rule work?

 

elseif { [string tolower [HTTP::host]] equals "accscientificsession.cardiosource.org/acc/acc13" } {

 

HTTP::redirect "destination.cardiosource.org"

 

Thanks for any assistance!

 

Diane

 

1 Reply

  • This would work, assuming we don't need to check the hostname, if you do, let me know and I'll update the rule accordingly;

    
    when HTTP_REQUEST {
     if { [HTTP::uri] equals "/ACC/acc13" } {
     HTTP::redirect "http://destination.cardiosource.org/"
     }
    }