0

I want to log all 404 page in magento 1.9. we want if url contain a word,the page should redirected to specific page

I have rewrite Mage_Cms_IndexController noRoute Method,

But i dont know this correct or not and is it have event in observer ?

1 Answer 1

0

you can override app/code/core/Mage/Cms/Controller/Router.php controller.

if your front name does not match any route then it will go to line#91

if (!$pageId) {
die('404 page');
 return false;
}

you can add log there before return true

print $identifier into log you will get what user enters actually

Mage::log($identifier, null, 'noRoute.log', true);

that's it let me know if you faced any issue

2
  • thank you but how can i forward to another page if condition be true?
    – majid
    Commented Oct 4, 2018 at 11:24
  • yes you can take reference from here or this one and accept this answer if your problem solved
    – Hitesh
    Commented Oct 4, 2018 at 11:26

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.