jbm123
03-29-2011, 07:07 PM
I rewrote the code supplied by nuclearspike in a previous post to redirect a url to a subdirectory in the root of my hosted domain. The placed the Web.config file containing the code (shown below) in the root directory. I purchased a domain pointer for the redirected url (thebitplayers.net).
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<rewrite>
<rules>
<rule name="thebitplayers_net" stopProcessing="true">
<match url=".*"/>
<conditions>
<add input="{HTTP_HOST}" pattern="^(www.)?thebitplayers.net"/>
<add input="{PATH_INFO}" pattern="^/BitPlayers/" negate="true"/>
</conditions>
<action type="Rewrite" url="\thebitplayers\{R:0}"/>
</rule>
</rules>
</rewrite>
</system.web>
</configuration>
When I try to access any site in my hosted domain containing the Web.config file I get the following HTTP error message (500.19):
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070032
Config Error The configuration section 'rewrite' cannot be read because it is missing a section declaration
Config File \\?\E:\web\newportlive\htdocs\web.config
Requested URL http://www.thebitplayers.net:80/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
Any suggestions?
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<system.web>
<rewrite>
<rules>
<rule name="thebitplayers_net" stopProcessing="true">
<match url=".*"/>
<conditions>
<add input="{HTTP_HOST}" pattern="^(www.)?thebitplayers.net"/>
<add input="{PATH_INFO}" pattern="^/BitPlayers/" negate="true"/>
</conditions>
<action type="Rewrite" url="\thebitplayers\{R:0}"/>
</rule>
</rules>
</rewrite>
</system.web>
</configuration>
When I try to access any site in my hosted domain containing the Web.config file I get the following HTTP error message (500.19):
Module IIS Web Core
Notification Unknown
Handler Not yet determined
Error Code 0x80070032
Config Error The configuration section 'rewrite' cannot be read because it is missing a section declaration
Config File \\?\E:\web\newportlive\htdocs\web.config
Requested URL http://www.thebitplayers.net:80/
Physical Path
Logon Method Not yet determined
Logon User Not yet determined
Any suggestions?