开发者

Change of Magento contacts page URL

How can I change Magento contacts page URL from /contacts to contact-us.h开发者_Python百科tml?

Thanks for any advice.


  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.


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.


Specifically must be

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


Have you tried changing the URL stub?

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜