2. December 2008 11:03
This post is merely a follow up on my previous post : SEO Friendly Urls in Sitecore -Remove spaces in Url .
Even if you use the encodeNameReplacements settings in your web.config, this may well not be enough to get you going with clean urls. Although it will allow you to access an item by replacing the spaces with a dash (.i.e. if you chose to replace a space with a dash in the encodeNameReplacements element) in the url, the links that are rendered on the page (either by doing sc:link in xslt or the usual .net code) will still contain "%20" characters.
Now, this is the bit where I "kind of" messed up. In Sitecore V6 , we have the concept of LinkManager in the web.config. By default, the EncodeNames property is set to true. This is correct and you SHOUD NOT CHANGE IT. If the EncodeNames property is set to false, you will end up having "%20" characters in your hyperlinks.
The big question for me is when and why did I change the EncodeNames to false? I don't know.. Maybe I thought, at some point in time, that toggling the key to a value of false would solve some other problem that I was experiencing?
Anyway, had I not changed EncodeNames to false , I would have never the known the actual meaning and implications of EncodeNames. We learn from our mistakes...
While we're here, you can remove the language code in the urls (http://hostname/en/node1/child.aspx) by changing the key languageEmbedding to "never". In that case, you will end with a url that looks like http://hostname/node1/child.aspx.
Back to Sitecore now..