1

What is the easiest way to

  1. change the /customer/account/login/ URL to /kupac/nalog/prijava/ but to preserve the functionality too?
  2. I will also need to change /product/id/X to proizvod/X where X can be arbitrary string or number.
  3. Lastly, I need to change URL: http://localhost/darnik/catalogsearch/result/?q=lajsna to this URL: http://localhost/darnik/katalog/pretrazi/?q=lajsna
3
+50

You can rewrite this core URL using config.xml of your module.

<global>
    <rewrite>
        <designer_url>
            <from><![CDATA[#^/kupac/nalog/prijava/#]]></from>
            <to><![CDATA[/customer/account/login/]]></to>
            <complete>1</complete>
        </designer_url>
    </rewrite>
</global>

UPDATE

<global>
    <rewrite>
        <custom_product>
            <from><![CDATA[#^/proizvod\/(.*)#]]></from>
            <to><![CDATA[/product/id/$1]]></to>
            <complete>1</complete>
        </custom_product>
    </rewrite>
</global>
1

If you are using magento 1.9 then this extension might help you.

You might want to look into this question too - Translate url keys when switching store

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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