Change of Magento contacts page URL

前端 未结 4 2428
时光说笑
时光说笑 2021-02-19 20:38

How can I change Magento contacts page URL from /contacts to contact-us.html?

Thanks for any advice.

相关标签:
4条回答
  • 2021-02-19 20:52

    The 'proper' way would be to create a small module similar to the below;

    app/etc/modules/Organisation_Module.xml

    <?xml version="1.0"?>
    <config>
        <modules>
            <Organisation_Module>
                <active>true</active>
                <codePool>local</codePool>
            </Organisation_Module>
        </modules>
    </config> 
    

    and...

    app/code/local/Organisation/Module/etc/config.xml

    <?xml version="1.0"?>
    <config>
        <modules>
            <Organisation_Module>
                <version>0.0.1</version>
            </Organisation_Module>
        </modules>
        <frontend>
            <routers>
                <contacts>
                    <use>standard</use>
                    <args>
                        <module>Mage_Contacts</module>
                        <frontName>contact-us.html</frontName>
                    </args>
                </contacts>
            </routers>
        </frontend>
    </config>
    

    Upload your files, clear your cache and you're good to go.

    0 讨论(0)
  • 2021-02-19 20:54

    Specifically must be

    New Url in ID Path and Target Path. Old Url in Request Path

    0 讨论(0)
  • 2021-02-19 21:12

    Have you tried changing the URL stub?

    0 讨论(0)
  • 2021-02-19 21:15
    1. In the Catalog menu click on URL Rewrite Management.
    2. Click the Add URL Rewrite button.
    3. Choose to add a Custom type.
    4. Enter "contacts" for ID Path and Target Path.
    5. Enter "contact-us.html" for the Request Path.
    6. Click the Save button.
    0 讨论(0)
提交回复
热议问题