2015-07-20 25 views
0

我在IIS 8应用程序的IIS 8上使用了以下重写规则。但是当我尝试访问www.mysiteurl.com/?_escaped_fragment_时,它给了我404错误。如果我将actionType更改为重定向,它将成功重定向。IIS 8重写规则给我404错误

<rule name="Prerender" stopProcessing="true"> 
      <match url="^(?!.*?(\.js|\.css|\.xml|\.less|\.png|\.jpg|\.jpeg|\.gif|\.woff|\.woff2|\.pdf|\.doc|\.txt|\.ico|\.rss|\.zip|\.mp3|\.rar|\.exe|\.wmv|\.doc|\.avi|\.ppt|\.mpg|\.mpeg|\.tif|\.wav|\.mov|\.psd|\.ai|\.xls|\.mp4|\.m4a|\.swf|\.dat|\.dmg|\.iso|\.flv|\.m4v|\.torrent))(.*)" ignoreCase="false" /> 
      <conditions logicalGrouping="MatchAny"> 
      <add input="{HTTP_USER_AGENT}" pattern="baiduspider|facebookexternalhit|twitterbot" /> 
      <add input="{QUERY_STRING}" pattern="_escaped_fragment_" ignoreCase="false" /> 
      </conditions> 
      <action type="Rewrite" url="http://service.prerender.io/http://{HTTP_HOST}/{R:0}" /> 
     </rule> 

但是,如果我将动作URL设置为资源在同一台服务器内工作。因为我觉得问题发生,因为它重定向到另一个域。
在IIS上是否有任何特定的设置来启用不同的域重写? 可能是什么问题?

回答

0

经过研究,我找到了解决方案。安装应用程序请求路由到IIS并启用代理解决了我的问题。

希望这会对一些人有所帮助:)