我正在使用WAMP运行Win 8 64x。我有一个CodeIgniter项目(v2.13),并且遵循有关如何从URL中获取/index.php/
的文档和在线教程,以便我的URL看起来像http://127.0.0.1/petclub/home/index
。
但是它不起作用。我收到404错误,页面上的消息是:
Not Found
The requested URL /petclub/index.php/home/index was not found on this server.
这是我.htaccess
文件中当前拥有的内容:
RewriteEngine On
RewriteBase /petclub/
RewriteCond %{REQUEST_URI} ^system.*
RewriteRule ^(.*)$ /index.php/$1 [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
我做错了什么?我已经尝试了所有建议,但似乎没有一个对我有用。
谢谢
您有一个叫家的控制器吗?
您的家庭控制器中是否有一个名为index的方法?
您将需要这两个选项才能正常工作