Removing double dashes to urlReplacing in umbracoSettings.config breaks certain pages (404 error)
Hi peoples
I'm trying to clean up urls on a site that I'm developing so that when a page name is converted into a url, it contains no double dashes
Example:
"Terms & Conditions" by default converts to "terms--conditions". Preferred url "terms-conditions"
In the umbracoSettings.config file, i have added only the following: (the italics part at the bottom of the list of <car org...></char>)
<requestHandler> <!-- this will ensure that urls are unique when running with multiple root nodes --> <useDomainPrefixes>false</useDomainPrefixes> <urlReplacing>
<char org="--">-</char> <!-- added to remove double dashes caused by other rules. eg "this / that" --> <char org="--">-</char> <!-- and again in case thre was an odd number of dashes remaining. -->
</urlReplacing> </requestHandler>
The urls leading to the page works fine (ie I now get "terms-conditions" in all html references) however when I land on the page - i now get a 404 error message (however "terms--conditions" still works)
Removing double dashes to urlReplacing in umbracoSettings.config breaks certain pages (404 error)
Hi peoples
I'm trying to clean up urls on a site that I'm developing so that when a page name is converted into a url, it contains no double dashes
Example:
"Terms & Conditions" by default converts to "terms--conditions". Preferred url "terms-conditions"
In the umbracoSettings.config file, i have added only the following: (the italics part at the bottom of the list of <car org...></char>)
The urls leading to the page works fine (ie I now get "terms-conditions" in all html references) however when I land on the page - i now get a 404 error message (however "terms--conditions" still works)
What else do I need to do to make this work?
Did you try to republish the entire site? (right-click your home-node and publish, including children)
Peter
Oh, and after you change the umbracoSettings, please touch the web.config as well (to force a application restart). Then republish.
Let us know if that works.
Peter
Awesome - the first one did the trick. Thanks for the help
is working on a reply...