Copied to clipboard

Flag this post as spam?

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


  • Declan Balla 2 posts 71 karma points
    Jul 17, 2015 @ 15:29
    Declan Balla
    0

    Illegal characters in path. - Error when using pipes "|" in the URL

    Hey All,

    I've been googling around for the past two days on this topic. I've found some related content but none solved my problem. So the issue is this. I've redeveloped a large traffic site:

    http://www.hawaiipictures.com/

    Now I'm getting a bunch of indexed pages (google and bing) that have pipes in them (| or %7C), so when they hit the new Umbraco site, they throw a 500 error with "Illegal characters in path". I basically just need to redirect them to applicable pages but when adding them to my rewrite map in my site config it hits the error before even redirecting. You can see the error by going here:

    http://www.hawaiipictures.com/%7C

    So this stack trace points to System.IO but I've checked a bunch of stuff, even down to the registry with no luck. Why I think it might be Umbraco is because if I try to go to an umbraco handled url, it renders an Umbraco error, like this one:

    http://www.hawaiipictures.com/pictures/index/module/media/category/gallery|volcanoes/pId/102/id/418/

    I surely could just throw these links in the url removal on google and bing but there's a bunch of them, and I don't want to loose the link weight on seo. Any help is much appreciated. Thanks!!

  • Rob Scott 41 posts 94 karma points
    Aug 07, 2015 @ 14:27
    Rob Scott
    0

    Ways that's I've got around this error is to edit the umbracoSetting.config file (under /config folder in root). Mine is probably more extensive b/c I had to add removal of tittles (accents), etc for different languages.

      <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="true">
          <char org="~"></char>
          <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="®;"></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="ě">e</char>
          <char org="š">s</char>
          <char org="č">c</char>
          <char org="ř">r</char>
          <char org="ž">z</char>
          <char org="ý">y</char>
          <char org="á">a</char>
          <char org="í">i</char>
          <char org="é">e</char>
          <char org="ó">o</char>
          <char org="ñ">n</char>
          <char org="ú">u</char>
          <char org="ů">u</char>
          <char org="ď">d</char>
          <char org="ť">t</char>
          <char org="ň">n</char>
          <char org="×">x</char>
          <char org="–">-</char>
          <char org="---">-</char>    
        </urlReplacing>
      </requestHandler>
    
Please Sign in or register to post replies

Write your reply to:

Draft