Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Stief Dirckx 43 posts 76 karma points
    Jan 08, 2011 @ 17:32
    Stief Dirckx
    0

    Classic asp file as website root document

    I have an old website that was developed using classic asp (.asp extension). I'm now trying to migrate this website to Umbraco. But I can't migrate the entire website in a single step, so I"m doing it bit by bit.

    For now the website's homepage still remains a classic asp page for a while and in Umbraco I added the uForum package because I want to migrate the old forum to Umbraco first. So in Umbraco I only have a single root node that represents the forum's landing page.

    When I browse to the root of my website using 'http://domain.com/' Umbraco serves me his first node, meaning the new forum (= NOT what I want). When I browse to the root using 'http://domain.com/default.asp' I get the website's homeage (= what I want).

    So now I want to be able to get to the homepage whitout the need of adding the file name 'default.asp' to the url. But I want to prevent using to much redirect statements in code to avoid SEO problems.

    Any ideas?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 08, 2011 @ 17:39
    Jan Skovgaard
    0

    Hi Stief

    I'm not sure if it works...but have you tried to see if you can cheat by removing the "default.aspx" in the "default setting" in IIS?

    If this wokrs it should be easy to workaround and you can always add "default.aspx" again when you're done migrating. Just a thought.

    /Jan

  • Stief Dirckx 43 posts 76 karma points
    Jan 08, 2011 @ 17:52
    Stief Dirckx
    0

    Hi Jan

    Thanks for the idea but unfortunately it didn't work. In the 'Default Document' settings of IIS 'default.asp' was ranked prior to 'default.aspx'. So normally the classic asp file should have come first. To be certain I explicitly removed the aspx document, but that gave no difference.

    My application pool is configured using integrated mode so I think classic asp is also passed through to the .Net framework meaning it will be served to Umbraco in the end. My hosting provider doesn't allow me to change the application pool settings.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 08, 2011 @ 17:58
    Jan Skovgaard
    0

    Hi Stief

    Ok, was worth the shot at least...

    How about making a 302 redirect then? Would'nt it just be neccesary to setup on the root node? Or do I miss something?

    /Jan

  • Stief Dirckx 43 posts 76 karma points
    Jan 08, 2011 @ 20:45
    Stief Dirckx
    0

    I added this rule to the UrlRewriting.config file and it seems to work:

    <add name="Homepage" virtualUrl="^~/$" rewriteUrlParameter="ExcludeFromClientQueryString" destinationUrl="~/default.asp" ignoreCase="true"/>

    Is this what you meant Jan?

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Jan 08, 2011 @ 20:55
    Jan Skovgaard
    0

    Hi Stief

    I'm happy you found a solution.

    What I was thinking was to set it up on IIS but I must admit that I don't know what's the better approach. But the above sounds like the simple solution you need for now. Can't say anything about it SEO-wise though...:-)

    /Jan

  • Stief Dirckx 43 posts 76 karma points
    Jan 08, 2011 @ 21:30
    Stief Dirckx
    0

    Jan

    I also tried the IIS solution using the URL Rewrite module you suggested. And this also works perfectly:

    <rewrite>
        <rules>
            <rule name="Homepage" stopProcessing="true">
                <match url="^$" />
                <action type="Rewrite" url="default.asp" logRewrittenUrl="false" />
            </rule>
        </rules>
    </rewrite>

    Thanks for pointing me into the right direction.

Please Sign in or register to post replies

Write your reply to:

Draft