如何设置php索引文件的web.config默认页面 [英] how to set web.config default page for php index file
本文介绍了如何设置php索引文件的web.config默认页面的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试在iis服务器上启动我的网站,我使用php。
I'm trying to start my web site on iis server and I use php for that.
服务器上的每件事情都很好但是defaultDocument。
every thing is fine on server but defaultDocument.
如何在web.config文件中设置它。
how can I set that on web.config file.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument enabled="true">
<files>
<remove value="default.aspx" />
<remove value="iisstart.htm" />
<remove value="index.html" />
<remove value="index.htm" />
<remove value="Default.asp" />
<remove value="Default.htm" />
<add value="index.php" />
</files>
</defaultDocument>
</system.webServer>
</configuration>
这是默认的xml,我尝试其他类似的东西:
this is the default xml and I try other thing like:
<clear />
或尝试删除其他页面...
or try to remove other pages...
任何想法如何设置这个文件?
any Idea how can I set this file?
推荐答案
经过一些研究,唯一合适的配置就是这个.. 。
after some more researches, the only suitable config was this...
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<defaultDocument>
<files>
<clear />
<add value="index.php" />
<add value="index.html" />
<add value="index.htm" />
</files>
</defaultDocument>
</system.webServer>
<system.data>
<DbProviderFactories>
<remove invariant="System.Data.SqlServerCe.4.0" />
<add invariant="System.Data.SqlServerCe.4.0" name="Microsoft® SQL Server® Compact 4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" />
</DbProviderFactories>
</system.data>
</configuration>
这篇关于如何设置php索引文件的web.config默认页面的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文