irule required.

hi all, an i

Need an help to get an irule.. my requirement if an user hit http://test.jobcredits.com or test.jobcredits.com in browser it should redirect it www.test.jobcredits.co. Please let me know what is the irule I should use for this or please let me know if u want more information.

thanks a lot for the help.

im sure someone will just provide it, but this is really simple and in my opinion you would help yourself by writing it yourself. the elements you need are a HTTP_REQUEST event, checking the HTTP::URI and doing a HTTP::redirect. if you google on any redirect irule it will even get easier to work from that example. do yourself a favor and learn to do it.

I think this may be the same question as you other question, but I agree with boneyard. Learning how to write iRules will be invaluable to you as time goes on and requirements get more complex.

Are you aware of LTM Policy? It can do many things just as iRules do but without the requirement of programming skills. See: DevCentral - An F5 Technical Community for details. It may be a preferred way to iRules in many circumstances.

(BTW, I love iRules myself.)

Here’s another link: “sol15085: Overview of the Local Traffic Policies feature” ( 404 Page not found | BIG-IP Documentation )

I know this is too old thread, but it came up. I think this should be it,

when HTTP_REQUEST {
    if { [string tolower [HTTP::host]] ends_with "test.jobcredits.com" } 
    {
        HTTP::redirect "https://www.test.jobcredits.co[HTTP::uri]"
    }
}