找不到 magento 404
magento 404 not found
我是 magento 的新手。我休假了它的教程并创建了我的第一个模块。
但是 returns 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>
'app/code/local/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>
P.S。控制器应该在 'app/code/local/Magentotutorial/Helloworld/controllers/' 目录中
$ a2enmod rewrite
$ service apache2 restart
我是 magento 的新手。我休假了它的教程并创建了我的第一个模块。 但是 returns 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>
'app/code/local/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>
P.S。控制器应该在 'app/code/local/Magentotutorial/Helloworld/controllers/' 目录中
$ a2enmod rewrite
$ service apache2 restart