skip to Main Content

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

3

Answers


  1. 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
    
    Login or Signup to reply.
  2. You need to overwrite the routes.xml file present in vendormagentomodule-contactetcfrontend 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>
    
    Login or Signup to reply.
  3. 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

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search