[英]magento 404 not found
我是magento的新手。 我放弃了其教程并创建了我的第一个模块。 但返回404找不到:
config.xml文件如下:
<?xml version='1.0'?>
<config>
<modules>
<Magentotutorial_Helloworld>
<version>0.1.0</version>
</Magentotutorial_Helloworld>
</modules>
</config>
Magento_Helloworld.xml是:
<config>
<modules>
<Magentotutorial_Helloworld>
<active>true</active>
<codePool>local</codePool>
</Magentotutorial_Helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>Magentotutorial_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
</config>
控制器是:
class Magentotutorial_Helloworld_IndexController extends Mage_Core_Controller_Front_Action {
public function indexAction() {
die( 'Hello Index!');
}
}
现在我尝试
http://127.0.0.1/magento/index.php/helloworld/index/index
并看到404页! 问题出在哪儿?
我从管理员清除了缓存!
xml文件的内容应如下所示:'app / etc / modules / Magentotutorial_Helloworld.xml':
<?xml version="1.0"?>
<config>
<modules>
<Magentotutorial_Helloworld>
<active>true</active>
<codePool>local</codePool>
</Magentotutorial_Helloworld>
</modules>
</config>
'应用程序/代码/本地/ Magentotutorial /的Helloworld的/ etc / config.xml中':
<?xml version="1.0"?>
<config>
<modules>
<Magentotutorial_Helloworld>
<version>0.1.0</version>
</Magentotutorial_Helloworld>
</modules>
<frontend>
<routers>
<helloworld>
<use>standard</use>
<args>
<module>Magentotutorial_Helloworld</module>
<frontName>helloworld</frontName>
</args>
</helloworld>
</routers>
</frontend>
</config>
PS控制器应位于“ app / code / local / Magentotutorial / Helloworld / controllers /”目录中
$ a2enmod rewrite
$ service apache2 restart
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.