根据Alan's blog的说明,我在 config.xml 中添加了路由器:
<?xml version="1.0"?>
<config>
<modules>
<Clean_Integration>
<version>1.0.0</version>
</Clean_Integration>
</modules>
<admin>
<routers>
<wellnesscoach_app_redirect>
<use>admin</use>
<args>
<module>Clean_Integration</module>
<frontName>appsync</frontName>
</args>
</wellnesscoach_app_redirect>
</routers>
</admin>
</config>
然后我在这里定义了我的控制器app/code/local/Clean/Integration/Controllers/IndexController.php
:
<?php
die('checkpoint1');
class Clean_Integration_IndexController extends Mage_Adminhtml_Controller_Action {
public function indexAction() {
$this->_redirectUrl('/appointments/sync/backend/');
die('checkpoint2');
}
}
当我尝试打开此网址时,它会转到前端并抛出 404。
是什么导致 magento 不接这个管理路由器?