Codeigniter无法从网址中删除索引 [英] Codeigniter can't remove index from url
本文介绍了Codeigniter无法从网址中删除索引的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用CentOS,
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond $1 !^(index\.php|robots\.txt|resources)
RewriteRule ^(.*)$ index.php/$1 [L]
RewriteBase /var/www/html/site/
</IfModule>
但是我的页面与index.php的工作正常但是当我删除index.php
它不工作...
but geting same problem my pages with index.php works fine but when i remove index.php it's not working...
推荐答案
我认为它会帮助你,因为我使用这一个。您的根文件夹的htaccess文件。
I think it will help you as i am using this one.Put this code in your root folder's htaccess file.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* index.php/$0 [PT,L]
请让我知道如果它是否工作。
Please let me know if it is working or not.
这篇关于Codeigniter无法从网址中删除索引的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文