1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Wordpress messes up URL's?

Discussion in 'Blogging' started by xtopzi, Sep 30, 2013.

  1. xtopzi

    xtopzi Regular Member

    Joined:
    Sep 28, 2010
    Messages:
    291
    Likes Received:
    205
    Since a couple of days, I'm getting visitors on dead pages because for some reason the URL they're visiting has an extra dash in it.

    Example:

    I get visitors on a URL like:

    domain.com/this-is-a--link
    instead of:

    domain.com/this-is-a-link

    There's an extra dash for no reason and I'm missing out on conversions. Anyone know how to fix this? 301 doesn't work either :S I'd like to either solve the problem or know a way to wildcard out of double dashes permantently.


    Thanks.
     
  2. imm088

    imm088 Registered Member

    Joined:
    Dec 26, 2012
    Messages:
    88
    Likes Received:
    27
    maybe somethings wrong in .htacess file?
     
  3. jhakasseo

    jhakasseo Senior Member

    Joined:
    Mar 1, 2012
    Messages:
    827
    Likes Received:
    237
    Occupation:
    Internet Marketing
    Location:
    On d Earth
    Home Page:
    have you check your indexed page in google with site:doman.com
    You can easily redirect your old url to new url by wordpress SEO plugin.
     
  4. SEOHULK

    SEOHULK BANNED BANNED

    Joined:
    Aug 20, 2013
    Messages:
    102
    Likes Received:
    45
    A temporary solution (to save your conversions) would be to create a folder with the exact URL name (this-is-a--link) and put index.html with redirect into it.

    So
    Code:
    [URL="http://www.domains.com/this-is-a--link/index.html"]www.domains.com/this-is-a--link/index.html[/URL]
    will redirect to
    Code:
    [URL="http://www.domains.com/this-is-a--ink/index.html"]www.domains.com/this-is-a--ink/index.html[/URL]
    immediately.
     
  5. xtopzi

    xtopzi Regular Member

    Joined:
    Sep 28, 2010
    Messages:
    291
    Likes Received:
    205
    Nope, admin area works fine. Keep in mind that it's not all URL's but just a bunch. I see people reaching those dead pages in my analytics, while the original, valid URLs also exist.

    Nope, Google has indexed the correct pages just fine. Know that this traffic shows as "direct visit" which makes it so frustrating :mad:

    I'll see if that works. A regular .htaccess redirect didn't do anything for this problem. The rest of my .htaccess file looks perfectly normal btw.
     
  6. laowai

    laowai Power Member

    Joined:
    Feb 27, 2011
    Messages:
    522
    Likes Received:
    184
    Are you sure that the problem is not in some 3rd party site who has linked to your site using invalid syntax in non-clickable link? This would explain why its direct traffic as it would be copy-pasted. Also, you said that 301 doesn't work, why so? What happens if you try to 301 to correct link. It should work.
     
  7. xtopzi

    xtopzi Regular Member

    Joined:
    Sep 28, 2010
    Messages:
    291
    Likes Received:
    205
    Could be the wrong URL pasting, however it's odd that it happens to so many different URL's, which is why I thought it was WP's fault.

    Dunno, 301 just didn't do anything for me. Redirected one of the -- URL's to - URL and still ended up at the wrong page, even with cookies cleared. Maybe Apache doesn't understand the dashes?
     
  8. tompots

    tompots Elite Member Premium Member

    Joined:
    Dec 11, 2011
    Messages:
    4,352
    Likes Received:
    3,955
    Gender:
    Male
    Occupation:
    Full Time Bot Developer
    Location:
    Professional Botters
    Home Page:
    You should ask HeRBaR, he is really good with wordpress and may beadle to help you out.
    Code:
    http://www.blackhatworld.com/blackhat-seo/members/213561-herbar.html
    
     
  9. laowai

    laowai Power Member

    Joined:
    Feb 27, 2011
    Messages:
    522
    Likes Received:
    184
    I would guess that your 301 syntax was not proper. Try for example RewriteRule ^(sample--page)$ / [R=301] as test and if it works modify it to your needs. The important part is the brackets as without those the dash will have different meaning. In case you have format like ([A-Za-z0-9-]+) in your RewriteRule and you want to include dash then you need to escape the dash with backslash '/-'.