Php 403禁止在IIS上使用codeigniter

Php 403禁止在IIS上使用codeigniter,php,iis,codeigniter-3,Php,Iis,Codeigniter 3,这就是我的工作: Windows Server 2016 SQL Server 2017 IIS 10 编码点火器3 这就是我所做的: 已安装IIS URL重写2.1 修改了位于应用程序中的web.config文件 文件夹: <?xml version="1.0" encoding="UTF-8"?> <configuration> <system.webServer> <rewrite> <rules> &

这就是我的工作:

  • Windows Server 2016
  • SQL Server 2017
  • IIS 10
  • 编码点火器3
这就是我所做的:

已安装IIS URL重写2.1

修改了位于应用程序中的web.config文件 文件夹:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
    <rules>
        <rule name="Index">
            <match url="^(.*)$"/>
            <conditions>
                <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true"/>
                <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true"/>
            </conditions>
            <action type="Rewrite" url="index.php/{R:1}"/>
        </rule>                
    </rules>
</rewrite>
</system.webServer>
修改了autoload.php文件:

$config['base_url'] = 'http://10.10.0.4/portalci/';
$config['index_page'] = '';
$autoload['helper'] = array('url');
结果:

当我去的时候,它工作得很好。删除index.php时,出现以下错误: 403-禁止:访问被拒绝

提前感谢您的帮助


旁注:在过去的16个小时里,我已经阅读了数百篇其他帖子,试图自己解决这个问题。

你应该使用.htaccess文件。如果.htaccess不支持,请联系您的主机提供商。我正在使用IIS。不是apache的.htaccess文件吗?更新-我在IIS中没有index.php设置的默认文档。现在我可以从中删除index.php了,它可以正常工作了。坏消息是,当我尝试访问时,例如,我仍然必须输入index.php。我希望它像这样干净:但我得到这个错误:404-文件或目录找不到。