繁体   English   中英

在Codeigniter中删除index.php时出错

[英]Error while removing index.php in Codeigniter

当我尝试使用.htaccess文件中的以下代码删除index.php形式的Codeigniter url时,我的项目文件夹隐藏了。

.htaccess代码(来自codeigniter用户指南):

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]

我的localhost当我不使用上述代码时(一切正常): 在此处输入图片说明

当我将该代码添加到.htaccess文件中时,我的localhost (我无法访问我的项目文件夹): 在此处输入图片说明

解决方案:

我忘记从wampp服务器中的Apache模块启用rewrite-module ,这就是问题所在!

谢谢大家

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM