Forum Discussion

Karthik_Krishn1's avatar
Karthik_Krishn1
Icon for Cirrostratus rankCirrostratus
Jan 18, 2017

Use Policy to do HTTP-HTTPS redirection

Hello,

 

Is it possible to use LTM traffic policies to do http-https redirection. Redirection should be based on requested URL.

 

For e.g if the requested URL contains "sitex" it should be redirected to "sitex/deltektc/welcome.msv" and if the requested URL contains "sitey" then it should be redirected to "sitey/irj/portal" and so on.

 

Also when we publish the policy, is the policy now applicable globally ?

 

Thanks,

 

Karthik

 

2 Replies

  • JG's avatar
    JG
    Icon for Cumulonimbus rankCumulonimbus

    That thread provides you with specific steps to create a traffic policy for an HTTP redirect you could model yours on. You will need two rules for your situations in Step 3. For rule 1, you need to define as follows:

    For "Conditions":
    
    Operarand: http-host
    Event: request*
    Condition: equals
    Values: siteA.domain.com
    
    For "Actions":
    
    Target: http-reply
    Event: request*
    Action: redirect
    
    Parameters:
        Name: location*
        Value: https://siteA.domain.com/irj/portal
    

    Create another rule for your 2nd situation likewise.