测试正常但是上传到空间到500错误这种事。开始利用起来web.config配置IIS显示详细错误信息的调整,Bug修复后将Detailed 改为 Custom ,前者意为“详细”,后者意为“自定义”。另外直接在虚拟主机控制面板自定义的404页面状态码可能不是404的时候,就会想着是否要利用起来,
-
<?xml version="1.0" encoding="UTF-8"?>
-
<configuration>
-
<system.webServer>
-
<httpErrors errorMode="Detailed" />
-
<asp scriptErrorSentToBrowser="true"/>
-
</system.webServer>
-
<system.web>
-
<customErrors mode="Off"/>
-
<compilation debug="true"/>
-
</system.web>
-
</configuration>
那么同样的,我们可以利用到这样的服务器配置代码做一次修改
-
<?xml version="1.0" encoding="UTF-8"?>
-
<configuration http://www.qdspaw.com>
-
<system.webServer>
-
<rewrite>
-
<rules>
-
<rule name="/ chinaunix Imported Rule" stopProcessing="true">
-
<match url="^.*?" ignoreCase="false" />
-
<conditions logicalGrouping="MatchAll">
-
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
-
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
-
</conditions>
-
<action type="Rewrite" url="index.php/{R:0}" />
-
</rule>
-
<rule name="/ Z-BlogPHP Imported Rule index.php" stopProcessing="true">
-
<match url="^index.php/.*?" ignoreCase="false" />
-
<conditions logicalGrouping="MatchAll">
-
<add input="{REQUEST_FILENAME}" matchType="IsFile" />
-
</conditions>
-
<action type="Rewrite" url="index.php/{R:0}" />
-
</rule>
-
</rules>
-
</rewrite>
-
<httpErrors errorMode="Detailed" />
-
</system.webServer>
-
</configuration>
web.config配置IIS显示详细错误信息就能够完美的解决了,也算是在服务器搭建配置上面稳稳的进入一步了。
阅读(3005) | 评论(0) | 转发(0) |