0

I need to customize the URLs for my site and would like to know how to change them. With CMS pages its very straightforward but I would like to know how to do it with a non cms page. Thank you

5
  • can you provide at least 1 or 2 examples?
    – Marius
    Mar 14, 2016 at 16:11
  • Well say I want to change the url for my contact us page. atm the url is index.php/contacts but I would like to change it to something like index.php/contact-us
    – Oli Tuck
    Mar 14, 2016 at 16:12
  • If possible, try to make these changes from admin panel, you can get this via URL Rewrite Management feature.
    – Prateek
    Mar 14, 2016 at 16:18
  • Once the url is changed, how can i make it so that in the footer where it says 'contact' it still links to the same page
    – Oli Tuck
    Mar 14, 2016 at 16:28
  • this still makes no sense as i have no idea what i am supposed to use as the ID Path?
    – Oli Tuck
    Mar 14, 2016 at 17:07

1 Answer 1

1

You can create small module, which will rewrite module routers.

For example for Contact Us page it will look something like:

Create file

app/etc/modules/Your_Module.xml

with content:

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

and second file

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

with content:

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.