Copied to clipboard

Flag this post as spam?

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


  • awm 187 posts 376 karma points
    Jan 21, 2012 @ 14:58
    awm
    0

    Site structure

    Hi guys,

    I've been playing around with my default site structure, trying to follow something like this: http://cultiv.nl/blog/2010/12/19/tip-of-the-week-the-ultimate-site-structure-setup/

    The problem I have is that something's not right with the urls. 

    I've put an internal redirect on my 'site' node that points to my 'home' node. I then have a few child pages under this home node. I've then created a simple a simple razor navigation script to list out the child pages using niceurl. However I'm still seeing all the links prefixed with: localhost/home/.

    I've added the following to my UrlRewriting.config:

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

    However it doesn't seem to have made a difference. I wondered whether it was possibly because I had to set the hostnames on my home node? I tried setting that to: http://localhost:<port>; but that didn't seem to make a difference (is localhost supported?).. nor did it work if I added this to my site node.

    I'm not really sure what else to try? I have a feeling it's something to do with the url rewrite but I can't figure it out. Anyone have an idea? :-)

    Thanks!

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 21, 2012 @ 15:11
    Jeroen Breuer
    3

    In Sebastiaan his blog the child nodes aren't under the home node. If you create nodes under the home node they will always start with /home/nodename. Only if you move your nodes away from the home node and put them under the site node they will have the url you want. The url rewritting is only to make sure if you go to /home that it will go to /. Only that will change and nothing else so /home/nodename will stay the same.

    Jeroen

  • awm 187 posts 376 karma points
    Jan 21, 2012 @ 15:21
    awm
    0

    Ah thanks. I always thought best practice was to store child pages under a parent home node? I suppose that goes out the window if you have a parent site node then?

  • Jeroen Breuer 4908 posts 12265 karma points MVP 5x admin c-trib
    Jan 21, 2012 @ 15:25
    Jeroen Breuer
    1

    Yes you're right. The only time when I store child nodes under the home node is with multilingual website. There the home node is usually called NL or EN (the still have a parent node called site for settings) and since you're having a multilingual site the url usually should look like this /nl/nieuws or /en/news. And /nl or /en will show the homepage. Otherwise just do it like in that blog :).

    Jeroen

Please Sign in or register to post replies

Write your reply to:

Draft