Imperva Cyber Community

communities_1.jpg
 View Only
  • 1.  URL Redirection

    Posted 05-12-2020 00:39
    Hi,

    I have several domains pointed to our single corporate domain & its sub directories. 

    example: Srilankan.lk                          Redirect to     www.srialankn.com
                    www.srilankancares.com    Redirect to     www.srilankan.com/en_uk/coporate/csr
                    www.slac.com                    Redirect to      www.srilankan.com/slac

    I can configure all red mark domain in to use www.srilankan.com CNAME. 

    Can I do above redirection by placing rule on WAF to check the host header and forward traffic to www.srilankan.com ?

    Thank you.
    Malith Hadunkuttige 

    #CloudWAF(formerlyIncapsula)

    ------------------------------
    Malith Hadunkuttige
    Srilankan Airlines
    Colombo
    ------------------------------


  • 2.  RE: URL Redirection

    Posted 05-12-2020 08:51

    Hi Malith,
    What you're referring to is what we call "CNAME Reuse" and it's supported by us with some limitations, i.e. SSL/TLS support may not be available depending on the use case. Y
    ou can read more about it in this article.

    As for redirecting the domains, this can be done quite easily using our Application Delivery Rules.
    The rule action can be based on many different matching filters and criteria, host header is one of them.

    Keep in mind this will work only for clients/browsers that make use of SNI extension, otherwise, the host header may not be present and results won't be as expected.

    Hope this helps,



    ------------------------------
    Ziv Leyes
    Senior Technical Account Manager
    Imperva


    "Thou shalt not covet
    thy neighbor's WiFi"
    ------------------------------



  • 3.  RE: URL Redirection

    Posted 06-01-2020 02:29
    Edited by Malith Hadunkuttige 06-01-2020 02:36
    Thank you Ziv.

    Our old domain is slac.lk (does not have WAF profile)  and new one is www.srilankan.com which has dedicated profile in WAF. what I need to do is:

                             slac.lk   >> Redirect to (301) >> www.srilankan.com

    basically traffic with "slac.lk" header value need to redirect www.srilankan.com

    Please help me.

    Thank you.

    Regards
    Malith

    ------------------------------
    Malith Hadunkuttige
    Srilankan Airlines
    Colombo
    ------------------------------



  • 4.  RE: URL Redirection

    Posted 06-01-2020 07:57

    Hi Malith,

    All you'll have to do is to point slac.lk on your domain settings to the given Imperva CNAME for www.srilankan.com. Due to the fact you'll be reaching the same origin that is configured for www.srilankan.com, you shouldn't need to do anything else as all traffic will start reaching your server via the WAF profile configured for www.srilankan.com. You won't need any redirections as you're already hitting the right target. You only need to make sure your server will be capable of serving requests that are being sent to host slac.lk.
    If you'd like to turn all requests to be made to the new host instead, then a rewrite host rule will be needed.
    Here's an example:


    You can chose different actions if you still need to perform other redirections, such as pointing any request to the old host to be sent to a specific URL within the server, etc.
    Let me know if you need further assistance with this.

    Cheers,


    ------------------------------
    Ziv Leyes
    Senior Technical Account Manager
    Imperva


    "Thou shalt not covet
    thy neighbor's WiFi"
    ------------------------------