求助:二级目录转向设置后 提示500错误 配置文件xml格式不正确

medasd 2016-11-10 07:16:28
想实现www.aaa.com/news/ 直接反向解析x.bbb.com的伪静态内容

服务器环境是:win2008+iis7+php

在网站根目录web.config 设置后,直接显示500错误,

打开IIs面板下 url rewrite等所有图标都提示“配置文件的xml格式不正确”

config代码如下:高手帮看下哪里出问题了呢


<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<allowedServerVariables>
<add name="HTTP_X_FORWARDED_HOST" />
</allowedServerVariables>
<rules>
<rule name="carProxy" stopProcessing="true">
<match url="^news(/?|.*)$" />
<conditions>
<add input="{HTTP_HOST}" pattern="www\.aaa\.com" />
</conditions>
<action type="Rewrite" url="http://x.bbb.com{R:1}" />
<serverVariables>
<set name="HTTP_X_FORWARDED_HOST" value="{HTTP_HOST}" />
</serverVariables>
</rule>
</rules>
<outboundRules>
<preConditions>
<preCondition name="ResponseIsHtml1">
<add input="{RESPONSE_CONTENT_TYPE}" pattern="^text/html" />
</preCondition>
</preConditions>
</outboundRules>
</rewrite>
</system.webServer>
</configuration>




...全文
640 回复 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
回复
切换为时间正序
请发表友善的回复…
发表回复

8,329

社区成员

发帖
与我相关
我的任务
社区描述
Web 开发 IIS
社区管理员
  • IIS
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧