Prevent UrlRewrite for existing files

Vote:
 

I'm trying to implement a typical splash-page functionality while using episerver 5. Whenever I hit the www.site.com/ I want to be served a static html page but once I move from there and go to the startpage from within the site I see the "default" start .

It's totally okay to map / to the static file and /en/ to the startpage in episerver.

With the old url rewriting I used to be able to map e.g. index.html as the preferred default page type and since this was found before default.aspx I would get index.html whenever I go for the / directory.

However the new url rewriting is "smarter" and catches my request for /(index.html).

I tried various combinations e.g. mapping .htm to ssinc.dll but I'm venturing into unknown territory here.

As soon as I enable the wildcard mapping episerver will serve the startpage in episerver.

Any ideas on how to solve this? Is there a way to tell the FriendlyUrlRewriteProvider to ignore pages that are "found"?

#19546
Apr 16, 2008 11:21
Vote:
 
Oh, and the IIS version is 6
#19547
Apr 16, 2008 11:22
Vote:
 
#19548
Apr 16, 2008 11:22
Vote:
 

It seems an custom url rewrite provider did the trick:

public class SplashUrlRewriteProvider : FriendlyUrlRewriteProvider
{
    public override bool ConvertToInternal(EPiServer.UrlBuilder url, out object internalObject)
    {
        if (url.AppRelativePath == "~/")
        {
            url.Path = "/index.htm";
            internalObject = PageReference.StartPage;
            return true;
        }

    return base.ConvertToInternal(url, out internalObject);
    }
}

#19549
Apr 16, 2008 12:27
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.