从URL(CodeIgniter)中删除index.php [英] Remove index.php from URL (CodeIgniter)

查看:158
本文介绍了从URL(CodeIgniter)中删除index.php的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

  RewriteEngine on 
RewriteCond $ 1!^( index\.php | assets | robots \.txt)
RewriteRule ^(。*)$ /leet/index.php/$1 [L]
<?= form_open('signup');?> 和页面刷新url将其值更改为 localhost / ci / index.php / signup



是否可以删除你必须检查你的config.php里面你的application \config目录,你可以看到,找到你的 / p>

  $ config ['index_page'] ='index.php'; 

更改为

  $ config ['index_page'] =''; 

我希望它有帮助!


I've removed the index.php throught this code:

RewriteEngine on
RewriteCond $1 !^(index\.php|assets|robots\.txt)
RewriteRule ^(.*)$ /leet/index.php/$1 [L]

But when I submit form <?=form_open('signup');?> and the page refreshes the url changes its value to localhost/ci/index.php/signup.

Is it possible to remove it?

解决方案

You must check your config.php inside your application\config directory, as you can see, locate your

$config['index_page'] = 'index.php';

Change that to

$config['index_page'] = '';

I hope it helps!

这篇关于从URL(CodeIgniter)中删除index.php的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆