Remove index.php from URL (CodeIgniter)

做~自己de王妃 提交于 2019-12-24 01:14:27

问题


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?


回答1:


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!



来源:https://stackoverflow.com/questions/12653589/remove-index-php-from-url-codeigniter

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!