Node names with spaces Options
bnkrazy
Posted: Tuesday, May 13, 2008 7:16:38 PM
Rank: Enthusiast

Joined: 5/13/2008
Posts: 37
Location: VA, USA
I have a couple node names which have spaces in them. By default, the URLs are in this format: site.com/node/node-with-spaces. Is there a way to change the default space replacement character with an underscore instead of a hyphen? The result should be site.com/node/node_with_spaces.

Thanks!

Chris
Dirk
Posted: Tuesday, May 13, 2008 7:47:10 PM

Rank: Fanatic

Joined: 9/27/2007
Posts: 498
Location: Belgium
Yep, you can. And it's quite easy.

Just go to /config folder, locate umbracoSettings.config in there and look for <urlReplacing> section.

Replace <char org=" ">-</char> by <char org=" ">_</char>

Make sure to republish the site so that the url's are being recalculated.

Any particular reason why you'd want to change this?

Good luck,
/Dirk

level 1 certified - umbraco blog at netaddicts.be
bnkrazy
Posted: Tuesday, May 13, 2008 8:33:27 PM
Rank: Enthusiast

Joined: 5/13/2008
Posts: 37
Location: VA, USA
Thanks! That worked great.

I'm changing it because I'm matching the URLs to an existing site URL scheme so I don't have to worry with redirects.

Chris
Dirk
Posted: Tuesday, May 13, 2008 9:34:35 PM

Rank: Fanatic

Joined: 9/27/2007
Posts: 498
Location: Belgium
Ok, that makes perfect sense. Good luck with the site.

/Dirk


level 1 certified - umbraco blog at netaddicts.be
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.