I have shared hosting server which runs IIS 7.5 .
I wrote this code in 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>
And I am getting following error.
HTTP Error 500.19 - Internal Server Error The requested page cannot be accessed because the related configuration data for the page is invalid
error code : Error Code 0x8007000d
Config Source -1: 0:
I know it could some small error. Can anybody help me out? Thanks.
User contributions licensed under CC BY-SA 3.0