codeigniter 3删除的index.php问题 [英] Codeigniter 3 Remove index.php Problems
问题描述
我有我开发用于codeigniter 2.1.4客户端的小项目,现在,他坚持要迁移到codeigniter 3 DEV版本。我知道这不是一个很好的IDEEA,但... 我的问题是,我不能删除URL中的index.php。
I have a little project that i developed for a client in codeigniter 2.1.4 and now, he insists to migrate to codeigniter 3 DEV version. I know that's not a good ideea but... My problem is that i can't remove the index.php from the url.
这是我的.htaccess文件:
This is my .htaccess file :
Options +FollowSymLinks
RewriteEngine on
# Send request via index.php
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?/$1 [L]
我已删除的config.php文件中的index.php
没有运气
我重新安装了LAMP服务器(我在Ubuntu 12.04),重新配置
我有其他的项目我的codeigniter 2.1.4和Laravel 4开发的本地服务器上,他们工作得很好,但这其中就杀了我。
谢谢!
I have removed the index.php from the config.php file
No luck
I reinstalled the LAMP server (i'm on Ubuntu 12.04'), reconfigured
I have other projects on my local server developed on Codeigniter 2.1.4 and Laravel 4 and they work just fine but this one it's killing me.
Thank you!
推荐答案
请直接添加跌破codeS到的的.htaccess 的文件,包括到您的 / codeigniter_project_folder /.htacess
Kindly add the below codes to .htaccess file and include it directly to your /codeigniter_project_folder/.htacess
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
这篇关于codeigniter 3删除的index.php问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!