IIS忽略重写规则

IIS忽略重写规则,iis,web-config,rewrite,Iis,Web Config,Rewrite,我有下面的web.config。我认为我的it没有问题,但我无法将其重写为索引。我还尝试了url=“index.php”,但没有引入/ 我的web.config有什么问题吗?或者是否还有其他错误(如IIS设置)-如果是,是否可以在不访问服务器的情况下进行检查(FTP到页面除外) 我想当打开一个没有文件名的URL时,您应该将index.php设为默认文档。请尝试以下方法: <?xml version="1.0"?> <configuration> &l

我有下面的web.config。我认为我的it没有问题,但我无法将其重写为索引。我还尝试了url=“index.php”,但没有引入/

我的web.config有什么问题吗?或者是否还有其他错误(如IIS设置)-如果是,是否可以在不访问服务器的情况下进行检查(FTP到页面除外)


我想当打开一个没有文件名的URL时,您应该将index.php设为默认文档。请尝试以下方法:

<?xml version="1.0"?>
    <configuration>
       <system.webServer>
          <defaultDocument enabled="true">
             <files>                      
                <add value="index.php"/> 
             </files>
          </defaultDocument>
          <modules runAllManagedModulesForAllRequests="true"/>
       </system.webServer>
    </configuration>

<?xml version="1.0"?>
    <configuration>
       <system.webServer>
          <defaultDocument enabled="true">
             <files>                      
                <add value="index.php"/> 
             </files>
          </defaultDocument>
          <modules runAllManagedModulesForAllRequests="true"/>
       </system.webServer>
    </configuration>