Copied to clipboard

Flag this post as spam?

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


  • Neil Hodges 197 posts 527 karma points
    Aug 17, 2016 @ 14:47
    Neil Hodges
    0

    Umbraco 7.4.3 Url Replacing not working

    Hi

    I have a page that need's to be created that has the use of parentheses. For example:

    /this-(page)-here

    But when creating the page umbraco strips out the parentheses and it looks like this:

    /this-page-here

    How can i get Umbraco not to strip out the parentheses. I have tried to add the section below but it is just ignoring it:

    <requestHandler>
        <!-- this will ensure that urls are unique when running with multiple root nodes -->
        <useDomainPrefixes>false</useDomainPrefixes>
        <!-- this will add a trailing slash (/) to urls when in directory url mode -->
        <addTrailingSlash>true</addTrailingSlash>
        <urlReplacing removeDoubleDashes="false" toAscii="false">
          <char org=" ">-</char>
          <char org="&quot;"></char>
          <char org="'"></char>
          <char org="%"></char>
          <char org="."></char>
          <char org=";"></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="æ">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>
          <char org="&lt;"></char>
          <char org="&gt;"></char>
          <char org="(">(</char>
          <char org=")">)</char>
          <char org="&#40;">(</char>
          <char org="&#41;">)</char>
        </urlReplacing>
      </requestHandler>
    

    Ive tried several settings, tried setting toAscii to true and false, rebilding the index after each change and refreshing the app pool and IIS but alas nothing seem's to work. Any ideas how i allow () in the url?

    Kind Regards

  • Alex Skrypnyk 5393 posts 19956 karma points MVP 3x admin c-trib
    Aug 17, 2016 @ 15:40
    Alex Skrypnyk
    0

    Hi Neil,

    It is how default url provier works. I think you have to write your own url provider.

    Read more - https://our.umbraco.org/documentation/reference/routing/request-pipeline/outbound-pipeline#urls

    Thanks,

    Alex

  • Neil Hodges 197 posts 527 karma points
    Aug 25, 2016 @ 13:55
    Neil Hodges
    0

    Hi Alex

    Thanks for your reply.

    Surely i shouldn't have to rewrite the whole url provider just to allow specific characters in my url? Previous versions allowed you override this in a config setting?

    Is this not the case now with Umbraco 7 versions?

    Kind Regards,

    Neil

  • Greg Berlin 818 posts 634 karma points
    Oct 31, 2016 @ 05:38
    Greg Berlin
    0

    So what was the answer to your question Neil? Did you have to rewrite the provider, or did you find a way to use the configs to rewrite characters as with previous versions of Umbraco?

  • Neil Hodges 197 posts 527 karma points
    Oct 31, 2016 @ 09:16
    Neil Hodges
    0

    Hi Greg

    No sorry didnt re-write the whole provider for something i think should work out of the box.

    In our case we ended up writing 301 re-directs to the new pages without the special characters. Are you having the same problem with it not allowing special characters?

  • Greg Berlin 818 posts 634 karma points
    Nov 01, 2016 @ 22:21
    Greg Berlin
    0

    Actually, I found adding that section back into the UmbracoSettings.config file did the trick... except i had to go an edit the name of each page affected, then edit it back to get it to generate the correct URLs.

Please Sign in or register to post replies

Write your reply to:

Draft