Forum Discussion

DG's avatar
DG
Icon for Nimbostratus rankNimbostratus
Jul 29, 2021

Domain redirect using policy.

Hello,

 

I have a server that has a domain name and the corresponding SSL redirect. I was asked to add a second domain name to the same server and perform a redirect to the original name when the http request comes in before the SSL redirect.

 

I have created a policy, unfortunately the redirect gets executed before my policy and I end up with un-trusted certificate.

 

Any suggestion would be greatly appreciated.

 

Thank you,

 

dg.

 

 

 

  • Sajid's avatar
    Sajid
    Icon for Cirrostratus rankCirrostratus

    try this

    in the redirect to location, "[HTTP::uri]" to keep URI.

  • DG's avatar
    DG
    Icon for Nimbostratus rankNimbostratus

    Actually your suggestion was one of the first I did try. It is still doing the SSL iRule redirect first and then redirecting the URL. I am just wondering if a better solution would be to have a separate Virtual Server only for port80 and set the redirect Policy there. It is not that elegant but it should do it. On another side, I believe that Policies are evaluated before iRules, am I correct?

     

    Thank you,

     

    dg

  • Sajid's avatar
    Sajid
    Icon for Cirrostratus rankCirrostratus

    this may help you

     

    Verifying Local Traffic Policy and iRule Precedence

    https://devcentral.f5.com/s/articles/verifying-local-traffic-policy-and-irule-precedence-31680

     

     

    K16590: The BIG-IP system now processes the local traffic policy before evaluating an iRule

    https://support.f5.com/csp/article/K16590