Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Hamish 95 posts 153 karma points
    Mar 20, 2010 @ 03:18
    Hamish
    1

    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>
                <char org="&quot;"></char>
                <char org="."></char>
                <char org=";"></char>
                <char org="/"></char>
                <char org=":"></char>
                <char org="+">plus</char>
                <char org="*">star</char>
                <char org="&amp;"></char>
                <char org="?"></char>
                <char org="#"></char>
                <char org="æ">ae</char>
                <char org="ø">oe</char>
                <char org="å">aa</char>
                <char org="ä">ae</char>
                <char org="ö">oe</char>
                <char org="ü">ue</char>
                <char org="ß">ss</char>
                <char org="Ä">ae</char>
                <char org="Ö">oe</char>

                <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)

    What else do I need to do to make this work?

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Mar 20, 2010 @ 10:00
    Peter Dijksterhuis
    1

    Did you try to republish the entire site? (right-click your home-node and publish, including children)

    Peter

  • Peter Dijksterhuis 1442 posts 1722 karma points
    Mar 20, 2010 @ 10:01
    Peter Dijksterhuis
    1

    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

  • Hamish 95 posts 153 karma points
    Mar 21, 2010 @ 01:03
    Hamish
    0

    Awesome - the first one did the trick. Thanks for the help

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies