<!--
Change 1:
To have spaces be changed to hyphens, you need to edit Sitecore’s web.config and tell it to replace " " with "-". In the "encodeNameReplacements" node, we add the final "replace" node seen below.
-->
<encodenamereplacements>
<replace mode="on" find="&" replaceWith=",-a-," />
<replace mode="on" find="?" replaceWith=",-q-," />
<replace mode="on" find="/" replaceWith=",-s-," />
<replace mode="on" find="*" replaceWith=",-w-," />
<replace mode="on" find="." replaceWith=",-d-," />
<replace mode="on" find=":" replaceWith=",-c-," />
<replace mode="on" find=" " replaceWith="-" />
</encodenamereplacements>
<!--
Change 2:
Because of this change, whenever someone requests a page with a hyphen, Sitecore is going to assume that it needs to be translated to a space which will cause issues so you also need to configure Sitecore to not allow content managers to use hyphens in their Item names. Change is again made in the web.config file.
-->
<setting name="InvalidItemNameChars" value="\/:?"<>|[]-/>.