load index.html before SF get into action

Posted by Community Admin on 04-Aug-2018 13:03

load index.html before SF get into action

All Replies

Posted by Community Admin on 26-Sep-2012 00:00

Sometimes I would like to have index.html pages to be loaded as default document.

Case 1
I did throw some designideas on a server and want the client to be able to look at them but work on SF in the same time

Solution
I could make a redirect external page to that index.html page were the screenshot is at and set it as Homepage

Case 2
SQL Server is down and I wan't a index.html page informing the visitors that we are working on the solution to get our site back up 

Solution
I could see what error I get and have the error redirect to that error.html page


Why I am asking this

I have set the ISS Default documents as seen in default_01.png
I have added this to my web.config  see default_02.png
And yes I have an index.html on the server see default_03.png

To me it seems that SF will overrule my settings, but can't really think that's true so please can anyone tell me where I go wrong?

http://roellin.ch.mserver2.arvixevps.com/index.html
http://roellin.ch.mserver2.arvixevps.com

Markus

Posted by Community Admin on 27-Sep-2012 00:00

Anyone? Markus

PS: There seems to be an answer from Telerik (3 post last by Telerik) but I cannot see it.

Posted by Community Admin on 08-May-2013 00:00

Hello Markus,

Have you overcome this issue?
We're having the same problem.

Thanks.

Posted by Community Admin on 08-May-2013 00:00

Nope

Markus

Posted by Community Admin on 08-May-2013 00:00

Since Sitefinity (5.4) ignores the IIS Default Document settings, we've ended up playing with Global.asax's begin request:

protected void Application_BeginRequest(object sender, EventArgs e)
        
            HttpApplication application = (HttpApplication)sender;
            HttpContext context = application.Context;
             
            if (context.Request.Url.LocalPath.ToString().Length < 4)
             
                context.Response.Clear();
                context.Response.Redirect("http://[domain]/index.html");
             
        

This answers our current need, but is just an example.

This thread is closed