如何设置php索引文件的web.config默认页面

编程入门 行业动态 更新时间:2024-10-28 20:22:21
本文介绍了如何设置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默认页面

本文发布于:2023-11-01 07:33:53,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1548677.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何设置   索引   页面   文件   php

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!