Rewrite url using config.xml in magento


To rewrite url using config.xml file in magento. We are insert below code to tab <global> in etc/config.xml file of you module.


  • Package name: khactung
  • Module name: test
  • Url before rewrite: oldurl, oldurl/ticket
  • Url after rewrite: newurl, newurl/post


         <!--rewrite url for controller (oldurl to newurl)-->
         <!--rewrite url for function (oldurl/ticket to newurl/post)-->

Some example after rewrite:

  • oldurl/ticket/          -> newurl/post/
  • oldurl/ticket/data  -> newurl/post/data
  • oldurl/ticket/123   -> newurl/post/123


About Author

Là một developer rất ham chơi nhưng không ham hố, không ham chơi nhưng rất thích cầm đầu...

Comments are closed.

%d bloggers like this: