Magento 1.9 create log for no-route
-
07-02-2021 - |
문제
Is there anyway I can force Magento to create a log file that contains the offending script path that is causing a redirect to no-route?
해결책
You need to create small module
config.xml
<frontend>
<routers>
<routeurfrontend>
<use>standard</use>
<args>
<module>Module_Noroughtlog</module>
<frontName>error</frontName>
</args>
</routeurfrontend>
</routers>
</frontend>
Add below code on IndexController.php
class Module_Noroughtlog_IndexController extends Mage_Core_Controller_Front_Action {
public function indexAction() {
Mage::log($this->getRequest()->getRequestUri()), null, "404-url-list.log");
}
}
제휴하지 않습니다 magento.stackexchange