Forum Discussion

rando_57003's avatar
rando_57003
Icon for Nimbostratus rankNimbostratus
Jan 25, 2012

Simple HTTP redirect

Hey guys I'm new to iRules, and I need help with a simple one. I have an old link that I'm afraid people have bookmarked, and I want to use an iRule to redirect to my current welcome page. It's so simple I've had trouble finding an example. I need an iRule to redirect http://test.com/welcome.aspx to http://test.com

 

 

I appreciate your help with this issue.

 

1 Reply

  • Hi Rando,

    Here's an example:

    
    when HTTP_REQUEST {
    
    if {[string tolower [HTTP::path]] eq "/welcome.aspx"}{
    HTTP::redirect "/"
    }
    }
    

    Aaron