301 redirect %20,%23,%C3,etc in middle of URLs

Discussion in 'Apache' started by f3ze, Oct 6, 2007.

  1. #1
    Hi, I have a few results showing up in google for things like:
    http://www.example.com/%20example/sub-example/sub-sub/

    some really weird ones like:
    http://www.example.com/%C3%83%C2%...C3%83%C2%A2%C3%82%E2%82%AC%C3%82%C2%BE/

    and a few %23 where there would normally be a # eg:
    http://www.example.com/example/sub-example/sub-sub/%23comments

    First I reckon the %20 could be knocked out with a htaccess line, but no luck so far.

    2nd, whats with the %23? Should I put all internal links as %23 instead of #, or just swap the %23 with # in htaccess?

    3rd (bear with me!) what with the gobbledygook in the 2nd example?

    Thanks!
     
    f3ze, Oct 6, 2007 IP
  2. Ladadadada

    Ladadadada Peon

    Messages:
    382
    Likes Received:
    36
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Google are usually pretty good about only following real links so if you can see GoogleBot crawling those URLs or if they are appearing in Google searches then it's probably an indication of a broken link somewhere.

    The broken link may be on your site or someone else's. Unfortunately, Google don't send referrer headers so it's impossible to tell.

    There are tools (I know of one called LinkChecker) that will crawl your site and look for any broken links. You could also use Google with the linkto: keyword and put the funny URL in after that. It's a long shot, but it just might work.

    Of course, the most immediate thing you can do is create a friendly 404 page that will try to determine what the user was looking for and redirect them there.
     
    Ladadadada, Oct 6, 2007 IP
    f3ze likes this.