Forum Discussion

Mike_Perez_6161's avatar
Mike_Perez_6161
Icon for Nimbostratus rankNimbostratus
Mar 16, 2017

redirect then rewrite header

We are bringing in a large amount of vanity domains, then need to redirect to content path but retain the vanity domain. Need some assistance writing the rule.

 

Example: Client reaches http://vanitydomain.com then get redirected to the content @ https://notyourdomain.com/vanitydomain but show vanitydomain.com in the address bar for the client.

 

It is ok if the path remains visible also, such as https://vanitydomain.com/vanitydomain

 

2 Replies

  • When you send a redirect back to the client, the new domain would have to be used for future requests by the client.

     

  • Mike,

    What you are requesting seems closer to a reverse-proxy instead of a redirect.

    This can be accomplished using URI Translation in a rewrite profile.

    In the URI rules section you would create an entry, possibly multiple entries.

    Client URI: https://vanitydomain.com/  
    Server URI: https://notyourdomain.com/vanitydomain/
    

    I modified both to be

    https
    and they will need to end in a
    /
    .

    I'm not sure if it's possible to have

    http
    client-side and
    https
    server-side, but if you could, I would strongly recommend against it.

    The rewrite profile has traditionally been a feature of APM, but I believe rewrite profiles were added to LTM starting in 11.4, but don't quote me on that.