Copied to clipboard

Flag this post as spam?

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


  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Jun 13, 2011 @ 18:22
    Ali Sheikh Taheri
    0

    umbrco redirect the root to the 2nd level node

    Hi,

    I have a website that using umbraco 4.0.2.1. here is the structure of the website.

    I am using a umbraco redirect to redirect the site to home . so the domain would be something like this: www.domain.com/home , What I would like to do is to get ride of Home in the URL and make the default URL of home page to  www.domain.com.

    I can easily do this in umbraco 4.0.3 by just removing umbraco redirect from site page, and make the umbracoUrlName to / for home. but this approach doesnt work on 4.0.2.1. there is no possibity of upgrading the umbraco as the website is vey huge.

    Any suggestion or work around?

    Thanks

    Ali 

     

     

  • Rich Green 2246 posts 4008 karma points
    Jun 13, 2011 @ 18:30
    Rich Green
    1

    Hey,

    Can't you just move the structure to the more normal:

    Content

    ------- Home

    ------------------ News

    ------------------ Finance

    Basically just replace 'Site' with the home node

    Rich

  • Roel 151 posts 305 karma points
    Jun 13, 2011 @ 19:16
    Roel
    1

    Or you could add this to the UrlRewriting.config file:

    <add name="home"
      virtualUrl= "^~/home/$"
      rewriteUrlParameter="ExcludeFromClientQueryString"
      destinationUrl="~/"
      ignoreCase="true"
      redirect="Application"
      redirectMode="Permanent" />

    Sebastiaan wrote about this over here: http://cultiv.nl/blog/2010/12/19/tip-of-the-week-the-ultimate-site-structure-setup/

     

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Jun 14, 2011 @ 14:22
    Ali Sheikh Taheri
    0

    Hi

    Rich:Unfortunately I can't move the structure as the site is very huge.

    Roel: thanks for the link, but still the rule does not redirect the /home to / , any idea?

    Thanks

    Ali

  • Ali Sheikh Taheri 470 posts 1648 karma points c-trib
    Jun 14, 2011 @ 15:02
    Ali Sheikh Taheri
    0

    thanks guys,

    I have used the above rule with a little change. in line 2 I have removed the / after home and that fixed the problem. ^~/home$

    <addname="home"
     
    virtualUrl="^~/home$"
     
    rewriteUrlParameter="ExcludeFromClientQueryString"
     
    destinationUrl="~/"
     
    ignoreCase="true"
     
    redirect="Application"
     
    redirectMode="Permanent"/>
  • Roel 151 posts 305 karma points
    Jun 14, 2011 @ 23:24
    Roel
    0

    @Ali yes, it depends on if you have "addTrailingSlash" set to "true" in config/umbracoSettings.config

    I believe this config setting was introduced in a newer version than the one you are using. 

Please Sign in or register to post replies

Write your reply to:

Draft