I have tried to changed the default URL of contact page in magento2 to my custom URL but it is not working at all.
I have tried as follows:
Put the following code in my custom module.xml
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Custom_Module" setup_version="1.0.0">
<sequence>
<module name="Magento_Contact"/>
</sequence>
</module>
And then rewrite the route as follows in routes.xml file:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
<router id="standard">
<route id="contact" frontName="kontakt">
<module name="Magento_Contact" />
</route>
</router>
</config>
Any Hint what is wrong going on here?