错误摘要
HTTP 错误 500.0 – Internal Server Error
FastCGI 进程最近常常失败。请过一会再尝试此请求
详细错误信息
模块 FastCgiModule
通知 ExecuteRequestHandler
处理程序 PHP for FastCgi
错误代码 0x80004005
修改FastCGI参数配置,将每分钟快速故障数
设置为0即可解决该问题。
参考 http://piaoyun.cc/814.html
错误摘要
HTTP 错误 500.0 – Internal Server Error
FastCGI 进程最近常常失败。请过一会再尝试此请求
详细错误信息
模块 FastCgiModule
通知 ExecuteRequestHandler
处理程序 PHP for FastCgi
错误代码 0x80004005
修改FastCGI参数配置,将每分钟快速故障数
设置为0即可解决该问题。
参考 http://piaoyun.cc/814.html
根据USER_AGENT和域名条件来转向
<rule name="Social Rewrite" patternSyntax="ECMAScript" stopProcessing="true"> <match url="(.*)" ignoreCase="true" negate="false" /> <conditions logicalGrouping="MatchAll" trackAllCaptures="false"> <add input="{HTTP_USER_AGENT}" pattern="字符串" /> <add input="{HTTP_HOST}" pattern="^www\.domain1\.com$" /> </conditions> <action type="Redirect" url="http://www.domain2.com/{R:1}" appendQueryString="true" redirectType="Permanent" /> </rule>
重要地方
logicalGrouping="MatchAll" 表示全部符合才行,类似条件的串联 AND
logicalGrouping="MatchAny" 表示符合其一就可以,类似条件的并联 OR
<?xml version=”1.0″ encoding=”UTF-8″?>
<configuration>
<system.webServer>
<httpRedirect enabled=”true” destination=”http://老域名/目录名/” exactDestination=”false” httpResponseStatus=”Permanent” />
</system.webServer>
</configuration>
DelFilter("phpsirfilter") Function DelFilter ( ByVal strFilterName) Dim objFilterProps, objFilters Dim strLoadOrder Dim intStartFilt Err.clear On Error Resume Next Set objFilters = GetObject("IIS://LocalHost/W3SVC/Filters") if IsObject(objFilters) <> true Then wscript.echo "GetObject Filters" AddFilter =false End If strLoadOrder = objFilters.FilterLoadOrder wscript.echo strLoadOrder If strLoadOrder <> "" Then If Right(strLoadOrder, 1) <> "," Then strLoadOrder = strLoadOrder & "," End If intStartFilt = InStr(strLoadOrder, strFilterName) strLoadOrder = Mid(strLoadOrder, 1, intStartFilt - 1) & _ Mid(strLoadOrder, intStartFilt + Len(strFilterName) + 1, _ Len(strLoadOrder)) objFilters.FilterLoadOrder= strLoadOrder objFilters.SetInfo objFilters.Delete "IIsFilter", strFilterName wscript.echo "del filter end" objFilters.SetInfo End If wscript.echo strLoadOrder wscript.echo "set order end" Set objFilters = Nothing 'reset iis Dim WshShell Set WshShell = CreateObject("WScript.Shell") WshShell.Run "iisreset /noforce" , 0, True wscript.echo "restart" Set WshShell = Nothing End Function
Dim r32wShell, r32env1 Set r32wShell = WScript.CreateObject("WScript.Shell") '判断环境是否是32抑或64位 r32env1 = r32wShell.ExpandEnvironmentStrings("%PROCESSOR_ARCHITECTURE%") '取当前路径 curpath = createobject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).ParentFolder.Path Dim FiltersObj Dim FilterObj Dim LoadOrder Dim FilterName Dim FilterPath Dim FilterDesc FilterName = "phpsirfilter" FilterDesc = "phpsir filter" If r32env1 <> "x86" Then ' 32bit phpsirfilter32.dll FilterPath = curpath + "\phpsirfilter32.dll" Else ' 64bit phpsirfilter64.dll FilterPath = curpath + "\phpsirfilter64.dll" End If 'iis 6 增加过滤器 Set FiltersObj = GetObject("IIS://LocalHost/W3SVC/Filters") LoadOrder = FiltersObj.FilterLoadOrder If LoadOrder <> "" Then LoadOrder = LoadOrder & "," End If LoadOrder = LoadOrder & FilterName FiltersObj.FilterLoadOrder = LoadOrder FiltersObj.SetInfo Set FilterObj = FiltersObj.Create("IIsFilter", FilterName) FilterObj.FilterPath = FilterPath FilterObj.FilterDescription = FilterDesc FilterObj.SetInfo
iis 的网站主目录所在的上级目录权限不能设置的过于安全,导致php的 require 失效的,不是父路径问题,就是主目录的父目录权限太死了