redirect

hi guys,

im new on F5 and we recently implemented and Active/Passive pair, the is one particular site i published which is https://12345.co.za and its suppose to redirect to http://54321.co.za/abc.

i have tried a couple irules i found here and non of them worked for me, unless im doing it wrong or missing something.

would appreciate any help.

thanks in advance.

Siphiwe.

Hi,

the best way is to create a local traffic policy (version 11.4 and above) with the following rule:

  • condition :
    • http-host equals 12345.co.za
    • http-uri path equals /
  • Action :
    • http-reply redirect /abc

hi Stanislas,

thanks for the reply, but im struggling to get this working let me give you more info,

site https://trustme.someone.co.za is open an IIS page instead of redirecting to

i tried adding the policy rule in different ways but i just cant get it right, more details using the examples above would really help

thanks again

Hi

Are you having the SSL termination on the F5. I can see that the first one is https site

Thanks

yes, im doing ssl termination on F5.

Did you try this one ?

when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals “trustme.someone.co.za” } { HTTP::redirect “” } }

the same as sha 01 irule but with a policy:

ltm policy policy-trustme.someone.co.za {
    controls { forwarding }
    requires { http }
    rules {
        redirect-trustme.someone.co.za {
            actions {
                0 {
                    http-reply
                    redirect
                    location http://wemadeit.together.ccom/DOIT
                }
            }
            conditions {
                0 {
                    http-host
                    host
                    values { trustme.someone.co.za }
                }
            }
            ordinal 1
        }
    }
    strategy first-match
}

to import it: tmsh load sys config merge from-terminal, paste the code and press CTRL-D

Policy looks ok. This should have worked. May be can you try updating the require list with client-ssl as well. Also can you please provide the VS config

Hi,

Does the policy redirect from http://trustme.someone.co.za to ?

to troubleshoot, try firefox with firebug extension to follow requests