I created a custom module for news. I need to change url structure for detail page.

My current news detail page url something like this


I need following url www.domain.com/news/detail/id/4/ or www.domain.com/news/id/4/

1 Answer 1


In order to fulfill,your requirement , need to implement custom route. By using custom route,your requirement will be fulfilled.

How to implement custom route see.

if you have using Ivan answer then you need to modification at match() function basic of your logic & requirment

Use Core Rewrite:

Also if do not use custom route then use magento Core rewrite

and use clockworkgeek .

$rewrite = Mage::getModel('core/url_rewrite');

Here i assume, details is Controller name =DetailsController.php index is an action name of DetailsController.php controller.


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.