+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / load index.html before SF get into action

load index.html before SF get into action

5 posts, 0 answered
  1. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    26 Sep 2012
    Link to this post
    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
  2. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    27 Sep 2012
    Link to this post
    Anyone? Markus

    PS: There seems to be an answer from Telerik (3 post last by Telerik) but I cannot see it.
  3. Chanan Zass
    Chanan Zass avatar
    123 posts
    Registered:
    21 Aug 2012
    08 May 2013 in reply to Markus
    Link to this post
    Hello Markus,

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

    Thanks.
  4. Markus
    Markus avatar
    2763 posts
    Registered:
    25 Nov 2005
    08 May 2013 in reply to Chanan Zass
    Link to this post
    Nope

    Markus
  5. Chanan Zass
    Chanan Zass avatar
    123 posts
    Registered:
    21 Aug 2012
    08 May 2013 in reply to Markus
    Link to this post
    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.
5 posts, 0 answered