How To Set Default Web Page In Umbraco
Asked Answered
K

2

9

I've just recently started trying to use Umbraco, so I hope this doesn't sound stupid.

I'm trying to set the default web page to my site, but I am having no luck. I recently installed umbraco v 4.7.1.1, along with the blog starter kit that you can select when using the installation wizard.

In my "Content View", I have the following structure:

Content (folder)

  • Personal Site (folder)
    • Index
    • About
    • MyTestBlog

When I look at the Properties tab for MyTestBlog, the Template property is set to "Blog Post". When I go to www.mytestsite.com, the content on MyTestBlog shows up on the site's default web page.

I have the Template property for the Index page set to "Textpage". I right clicked on the Personal Site folder and selected Sort. From the Sort pop-up window, I dragged Index to the top of the list so that it has the sort order of zero (0).

From what I have read, whatever is set as the first item will be the default web page in Umbraco, but this does not seem to be the case for me. No matter what I try, I cannot get Index to be the default web page for the site.

I have checked to ensure that all of the web pages have been published. Is there something that I am missing or not doing?

Thanks!

Kobe answered 1/3, 2012 at 5:22 Comment(0)
C
18

Not a stupid question at all, it's a common stumbling block when first learning Umbraco. I know it tricked me when I started. Your assumptions are correct in that Umbraco will display the first node as the default page, but it's the node Personal Site which is actually the first node.

To fix this, add a property with the alias umbracoInternalRedirectId of data type Content Picker to your Personal Site document type. Then in the content section pick the node you want the Personal Site node to default to (it doesn't even have to be the first subnode).

Normally, you could use a property alias of umbracoRedirect but Umbraco doesn't allow this on the first node without it's problems. umbracoRedirect is safe to use (and generally preferred) for any other node in the site.

Cacia answered 1/3, 2012 at 10:33 Comment(1)
Link is broken.Unclad
M
0

Or, if the website has already been published, add a rewrite rule to the Web.Config:

    <rewrite>
        <rules>
            <rule name="Redirect to front" patternSyntax="ECMAScript" stopProcessing="true">
                <match url="^$" />
                <action type="Redirect" url="/yourViewName" />
            </rule>
        </rules>
    </rewrite>

Just include that inbetween the system.webServer tags within the configuration tags, and replace yourViewName by the appropriate view's name (like Contact or Work) and you're done!

Best of luck.

Meridional answered 22/10, 2021 at 13:23 Comment(1)
Your answer could be improved with additional supporting information. Please edit to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center.Costly

© 2022 - 2024 — McMap. All rights reserved.