Chinaunix首页 | 论坛 | 博客
  • 博客访问: 342055
  • 博文数量: 21
  • 博客积分: 0
  • 博客等级: 民兵
  • 技术积分: 223
  • 用 户 组: 普通用户
  • 注册时间: 2020-07-01 21:01
个人简介

青岛风月网www.qdspaw.com,男士减压休闲养生体验平台。

文章分类
文章存档

2020年(21)

我的朋友

分类: PHP

2020-07-05 13:12:16

测试正常但是上传到空间到500错误这种事。开始利用起来web.config配置IIS显示详细错误信息的调整,Bug修复后将Detailed 改为 Custom ,前者意为“详细”,后者意为“自定义”。另外直接在虚拟主机控制面板自定义的404页面状态码可能不是404的时候,就会想着是否要利用起来,

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration>
  3.   <system.webServer>
  4.     <httpErrors errorMode="Detailed" />
  5.     <asp scriptErrorSentToBrowser="true"/>
  6.   </system.webServer>
  7.   <system.web>
  8.     <customErrors mode="Off"/>
  9.     <compilation debug="true"/>
  10.   </system.web>
  11. </configuration>
那么同样的,我们可以利用到这样的服务器配置代码做一次修改

点击(此处)折叠或打开

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <configuration http://www.qdspaw.com>
  3.   <system.webServer>
  4.     <rewrite>
  5.       <rules>
  6.         <rule name="/ chinaunix Imported Rule" stopProcessing="true">
  7.           <match url="^.*?" ignoreCase="false" />
  8.           <conditions logicalGrouping="MatchAll">
  9.             <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
  10.             <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
  11.           </conditions>
  12.           <action type="Rewrite" url="index.php/{R:0}" />
  13.         </rule>
  14.         <rule name="/ Z-BlogPHP Imported Rule index.php" stopProcessing="true">
  15.           <match url="^index.php/.*?" ignoreCase="false" />
  16.           <conditions logicalGrouping="MatchAll">
  17.             <add input="{REQUEST_FILENAME}" matchType="IsFile" />
  18.           </conditions>
  19.           <action type="Rewrite" url="index.php/{R:0}" />
  20.         </rule>
  21.       </rules>
  22.     </rewrite>
  23.     <httpErrors errorMode="Detailed" />
  24.   </system.webServer>
  25. </configuration>

web.config配置IIS显示详细错误信息就能够完美的解决了,也算是在服务器搭建配置上面稳稳的进入一步了。
阅读(2879) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~