0

I think Magento 2.1 changed the way how to modify the url of contact page. The old tutorials is not working anymore, like this: (Change of Magento contacts page URL).

Maybe im doing something wrong too.

Can anyone help me?

I will appreciate any response.

URL configuration

Sérgio Thiago Mendonça
  • 1,161
  • 2
  • 13
  • 23
  • Yes, you are right. You can create a static block and put contact block. After that create a category of contact and assign that static block in this category – Arshad Hussain Jan 02 '18 at 11:37
  • I think it could work, but it is a long way to do a thing that should be simple. Do you know something different? thanks by your time. – Sérgio Thiago Mendonça Jan 02 '18 at 19:56

3 Answers3

1

You need to overwrite the routes.xml file present in vendor\magento\module-contact\etc\frontend\ folder

change from

<code>

<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="contact">
            <module name="Magento_Contact" />
        </route>
    </router>
</config>

</code>

to:

<code>

<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd">
    <router id="standard">
        <route id="YOUR_Choice" frontName="YOUR_Choice">
            <module name="Magento_Contact" />
        </route>
    </router>
</config>

</code>
Abhinav Kumar Singh
  • 2,325
  • 1
  • 10
  • 11
0
Here you have to Add 2 URL Rewrite 
For example for login
1) 
    Request Path : customer/account/login
    Target Path : login
    Redirect Type : Permanent (301)

2 (another rewrite for same )

   Request Path : login
    Target Path :  customer/account/login
    Redirect Type : NO

Hope fully it will works.
In both url call perform same operations
Ankit
  • 26
  • 8
0

You can use.htacess write following code

RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC,OR]
RewriteCond %{HTTP_HOST} ^www.example.com [NC]
RewriteRule ^(.*)$ http://example.net/$1 [L,R=301,NC]
or you can do with admin panel also

or

1st->go to admin->marketing->seo&search->urlrewrite change url according to your requirements

arvind jha
  • 71
  • 7