【发布时间】:2019-01-14 04:41:51
【问题描述】:
我使用iis服务器,我尝试了一些方法,但没有奏效;
config.php
$config['index_page'] = '';
.htaccess;
<IfModule authz_core_module>
Require all denied
</IfModule>
<IfModule !authz_core_module>
Deny from all
</IfModule>
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php/$1 [L]
</IfModule>
为什么 index.php 没有从 url 中删除?我怎样才能以另一种方式删除它?
【问题讨论】:
-
尝试在规则的最后一行添加
?问号。例如 -RewriteRule ^(.*)$ index.php?/$1 [L] -
你能先检查一下mod_rewrite是否启用
-
什么?你是什么意思?添加哪个部分?
标签: .htaccess codeigniter