Iis 7 II7.5:尝试在web.config中写入重写规则时出错

Iis 7 II7.5:尝试在web.config中写入重写规则时出错,iis-7,url-rewriting,web-config,rewrite,iis-7.5,Iis 7,Url Rewriting,Web Config,Rewrite,Iis 7.5,我有一个运行IIS 7.5的共享托管服务器 我在web.config中编写了这段代码 <system.webServer> <rewrite> <rules> <rule name="AddWWWprefix" > <match url="(.*)" ignoreCase="true" /> <conditions>

我有一个运行IIS 7.5的共享托管服务器

我在web.config中编写了这段代码

<system.webServer>
    <rewrite>
        <rules>
            <rule name="AddWWWprefix" >
                <match url="(.*)" ignoreCase="true" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="^abc\.com" />
                </conditions>
                <action type="Redirect" url="http://www.abc.com/{R:1}" redirectType="Permanent" />
            </rule>

            <rule name="RemoveWWWprefix" >
                <match url="(.*)" ignoreCase="true" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="^www\.abc\.com" />
                </conditions>
                <action type="Redirect" url="http://abc.com/{R:1}" redirectType="Permanent" />
            </rule>
        </rules>
    </rewrite>
</system.webServer>
我得到以下错误

HTTP错误500.19-内部服务器错误 无法访问请求的页面,因为该页面的相关配置数据无效

错误代码:错误代码0x8007000d

配置源 -1: 0:

我知道这可能是个小错误。有人能帮我吗?
谢谢。

你能发布错误页面的截图吗?这是您的整个web.config吗?您提供的we.config文件的一部分还可以。可能是web.config另一部分中的错误-请提供整个文件。另一种可能性-您没有安装URL重写模块。@LazyOne-我不知道URL重写模块是一个单独的组件。你解决了我的问题,谢谢!