web.config file and redirection seems to be screwed up...

Topics: Business Logic Layer
Oct 2, 2013 at 1:54 AM
Hello Everyone...

I have unzipped and uploaded all the 2.8 files plus the upgrade patch, to my subfolder hosted by Network Solutions. The problem I am having is when you type in http://www.daleallen.net/blog the home page of the 2.8 page comes up just fine. The physical folder for that is www\blog (In the Network Solutions control panel.)

But when I type in the web address that I setup as a pointer, which is http://blog.daleallen.net, (The same physical folder as the first address above), the pages show up but they are all screwed up. When checking one of the hyperlinks on that page, it shows up as http://blog.daleallen.net/blog/TheFolderNameOrTheFileName.aspx. The pointer in Network Solutions seems to be adding an extra virtual folder to the path of the hyperlink.

After pounding the hell out of tech support at NetSol, they insisted that he problem lays in the two web.config files, the one on the root folder (Shown below) and the default web.config file that ships with the patched program (Version 2.8.0.1.)

I have posted the web.config file that the Hosting provider created after the pointers are configured in the control panel.

Can anyone tell me what is causing the extra virtual folder (blog.daleallen.net/BLOG) to be created? what other information can I provide you folks with in order to troubleshoot this problem?

Please advise and please see below...

Dale Allen

contactme (->@<-) daleallen.com

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
    <rewrite>
        <rules>
            <rule platformId="wdpVpr" name="bt.daleallen.net virtual path rewrite" stopProcessing="true">
                <match url="^.*$" ignoreCase="false" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="^bt\.daleallen\.net$" />
                </conditions>
                <action type="Rewrite" url="/blogtest/{R:0}" appendQueryString="true" />
            </rule>
            <rule platformId="wdpVpr" name="www.bananapages.net virtual path rewrite" stopProcessing="true">
                <match url="^.*$" ignoreCase="false" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="^www\.bananapages\.net$" />
                </conditions>
                <action type="Rewrite" url="/bp/{R:0}" appendQueryString="true" />
            </rule>
            <rule platformId="wdpVpr" name="bananapages.net virtual path rewrite" stopProcessing="true">
                <match url="^.*$" ignoreCase="false" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="^bananapages\.net$" />
                </conditions>
                <action type="Rewrite" url="/bp/{R:0}" appendQueryString="true" />
            </rule>
            <rule platformId="wdpVpr" name="blog.daleallen.net virtual path rewrite" stopProcessing="true">
                <match url="^.*$" ignoreCase="false" />
                <conditions>
                    <add input="{HTTP_HOST}" pattern="^blog\.daleallen\.net$" />
                </conditions>
                <action type="Rewrite" url="/blog/{R:0}" appendQueryString="true" />
            </rule>
        </rules>
        <outboundRules>
            <rule name="bt.daleallen.net virtual path rewrite">
                <match serverVariable="RESPONSE_LOCATION" pattern="^(https?\://bt\.daleallen\.net)/blogtest/(.+/)$" />
                <conditions>
                    <add input="{RESPONSE_STATUS}" pattern="^301$" ignoreCase="false" />
                </conditions>
                <action type="Rewrite" value="{R:1}/{R:2}" />
            </rule>
            <rule name="www.bananapages.net virtual path rewrite">
                <match serverVariable="RESPONSE_LOCATION" pattern="^(https?\://www\.bananapages\.net)/bp/(.+/)$" />
                <conditions>
                    <add input="{RESPONSE_STATUS}" pattern="^301$" ignoreCase="false" />
                </conditions>
                <action type="Rewrite" value="{R:1}/{R:2}" />
            </rule>
            <rule name="bananapages.net virtual path rewrite">
                <match serverVariable="RESPONSE_LOCATION" pattern="^(https?\://bananapages\.net)/bp/(.+/)$" />
                <conditions>
                    <add input="{RESPONSE_STATUS}" pattern="^301$" ignoreCase="false" />
                </conditions>
                <action type="Rewrite" value="{R:1}/{R:2}" />
            </rule>
            <rule name="blog.daleallen.net virtual path rewrite">
                <match serverVariable="RESPONSE_LOCATION" pattern="^(https?\://blog\.daleallen\.net)/blog/(.+/)$" />
                <conditions>
                    <add input="{RESPONSE_STATUS}" pattern="^301$" ignoreCase="false" />
                </conditions>
                <action type="Rewrite" value="{R:1}/{R:2}" />
            </rule>
        </outboundRules>
    </rewrite>
</system.webServer>
</configuration>
Oct 2, 2013 at 1:08 PM
this rewrite rules in your web.config that you have pasted are causing extra virtual folder. These are not part of the default installation, why do you need them?
Oct 2, 2013 at 3:25 PM
The answer is that the hosting provider is using web.config in the root folder of my shared hosting package to redirect url's. Meaning instead of using http://www.daleallen.net/blog, I want to redirect the URL (the site) to: http://blog.daleallen.net. My hosting provider (Network Solutions) has pointers that allow you to redirect the alias url to a physical folder on your hosting package.

However, as I stated, they use web.config in the root folder to do the job. So I need to learn how to modify this file to support the redirected URL, to support blogengine.net software.

Can you help?

Dale Allen