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:
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? :-)
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.
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?
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 :).
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:
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!
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
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?
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
is working on a reply...