有3个步骤要删除
index.php。
在
application/config.php
文件中进行以下更改$config['base_url'] = 'http://'.$_SERVER['SERVER_NAME'].'/Your Ci folder_name';
$config[‘index_page’] = ‘’;
$config[‘uri_protocol’] = ‘AUTO’;请
.htaccess
使用下面的代码文件的根目录RewriteEngine on
RewriteCond $1 !^(index.php|resources|robots.txt)
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L,QSA]启用重写引擎(如果尚未启用)
一世。 首先,使用以下命令启动它:
a2enmod rewrite
ii。 编辑档案
/etc/apache2/sites-enabled/000-default
全部更改
AllowOverride None为
AllowOverride All。
注意:在最新版本中,您需要更改
/etc/apache2/apache2.conf文件
iii。 使用以下命令重新启动服务器:
sudo /etc/init.d/apache2 restart
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)