'Magento 2 : Redirect Custom old Url to New url Controller

In Magento 1 we could redirect an old URL like this:

<rewrite>
        <resa_choixclient>
            <from><![CDATA[#^/resa_choixclient.php/?(.*)#]]></from>
            <to><![CDATA[/controller/index/message$1]]></to>
            <complete>1</complete>
        </resa_choixclient>
    </rewrite>

I would like to know how to redirect an old URL in Magento 2.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source