用WAMP和URL重写CodeIgniter 404错误
问题描述:
我用WAMP运行Win 8 64x。我有一个CodeIgniter项目(v2.13),并且我已经阅读了关于如何从URL中获取/index.php/
的文档和在线教程,以便我的URL看起来像http://127.0.0.1/petclub/home/index
。用WAMP和URL重写CodeIgniter 404错误
但它不工作。我得到了一个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]
我在做什么错?我试过所有的建议,而且他们都没有为我工作。
谢谢
答
你有一个家庭控制器?
在yout home controller中有一个称为index的方法吗?
你需要这两个才能工作