12

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

Thanks for any advice.

clockworkgeek
  • 37,650
  • 9
  • 89
  • 127
Blazo
  • 697
  • 3
  • 9
  • 15

4 Answers4

20
  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.
clockworkgeek
  • 37,650
  • 9
  • 89
  • 127
  • I tried to add rewrite step by step - still getting 404. What might cause the problem? – arekstasiewicz Dec 13 '12 at 16:19
  • I cannot think of anything definite, it's usually reliable. Perhaps you need to clear the cache, or maybe you accidentally got some of the fields mixed up. – clockworkgeek Dec 13 '12 at 22:36
  • As you said - probably I mixed up the fields. I've add rewrite once again and it works. Thanks! – arekstasiewicz Dec 14 '12 at 15:22
  • Worked well for me. I couldn't figure out why it was still 404'ing until I re-read the answer - I was putting "contacts" into the Request Path and not the Target Path (as Magento lists the fields in the order of ID Path, Request Path, Target Path). – Thomas Harding Nov 16 '17 at 14:03
13

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.

Dan Norris
  • 413
  • 3
  • 15
1

Specifically must be

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

yavonz15
  • 178
  • 6
0

Have you tried changing the URL stub?

Vince P
  • 1,781
  • 7
  • 29
  • 67