删除localhost / folder / my_codeigniter /

时间:2019-03-03 09:03:13

标签: php codeigniter

我已经尝试从任何来源尝试一些解决方案,但是如果我的项目位于其他文件夹中,例如 http://localhost/project/my_codeigniter ,仍然无法删除index.php,如果我的所有.htaac​​cess和配置都可以 http://localhost/my_codeigniter 中的项目。

希望可以帮助我,谢谢!

1 个答案:

答案 0 :(得分:2)

您可以在项目根文件夹中创建一个.htaccess文件。这样的文件内容;

RewriteEngine on
RewriteCond $1 !^(index\.php|assets)
RewriteRule ^(.*)$ /your-project/index.php/$1 [L]