문제

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 ?

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 magento.stackexchange
scroll top