Get This To Work For Me & Earn $50.00 USD

Discussion in 'Site & Server Administration' started by SeoVeteran33, Jul 20, 2008.

  1. #1
    first off, paypal and epassporte only


    Now the issue...

    A sitemap builder I used built an xml sitemap but used "_" instead of "-" when building my sitemap for some reason. My site uses ONLY "-". Without knowing, I submitted this to google and now they think that tons of my urls have "_".

    I need to redirect urls with "_" to "-" somehow. Nothing I have tried works.

    I have also tried simply redirecting the exact url to the correct version. For example:

    Redirect permanent /category/path_to_video http://www.mysite.com/category/path-to-video

    When I try this my htaccess is adding garbage non-seo text at the end so that I get:

    http://www.mysite.com/category/path-to-video?action=browse&cat=1


    Help me solve this and I pay you $50.00. Simple as that. I have ICQ so we can chat there. PM me or post here your ICQ if you think you know the solution.
     
    SeoVeteran33, Jul 20, 2008 IP
  2. godsofchaos

    godsofchaos Peon

    Messages:
    2,595
    Likes Received:
    124
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Here is your solution.... :


    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
     
    RewriteRule !\.(html|php)$ - [S=5]
    RewriteRule ^([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4-$5-$6-$7 [E=underscores:Yes]
    RewriteRule ^([^_]*)_([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4-$5-$6 [E=underscores:Yes]
    RewriteRule ^([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4-$5 [E=underscores:Yes]
    RewriteRule ^([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4 [E=underscores:Yes]
    RewriteRule ^([^_]*)_([^_]*)_(.*)$ $1-$2-$3 [E=underscores:Yes]
    RewriteRule ^([^_]*)_(.*)$ $1-$2 [E=underscores:Yes]
     
    RewriteCond %{ENV:underscores} ^Yes$
    RewriteRule (.*) http://d.com/$1 [R=301,L]
    PHP:

    Paypal? Do PM me after you solve it.. :) Cheers!
     
    godsofchaos, Jul 20, 2008 IP
  3. SeoVeteran33

    SeoVeteran33 Well-Known Member

    Messages:
    390
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    108
    #3
    Thanks for the post. I tried that one already. Curious, did you get it from askapache as well?

    What I'm doing for now is 301 redirecting each url individually since it's the only thing that works. I figured out how to get rid of the garbage text that htaccess was adding.

    I think I will need a custom solution because the script I use has a lot of htaccess rewrites in it already which is why I think the fix from askapache didn't work.
     
    SeoVeteran33, Jul 20, 2008 IP
  4. Yousif

    Yousif Banned

    Messages:
    233
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    How about you go to the index to where your entire xml data is, and simply put this in the code:

    <meta HTTP-EQUIV="REFRESH" content="0; url=http://www.yourdomain.com/index.html">

    It'll just forward everything to the correct address using your "-".
     
    Yousif, Jul 20, 2008 IP
  5. SeoVeteran33

    SeoVeteran33 Well-Known Member

    Messages:
    390
    Likes Received:
    11
    Best Answers:
    0
    Trophy Points:
    108
    #5
    It's not a cosmetic thing though. See nobody but google really cares whether it's "-" or "_". I want the url to be indexed with "-" so I need to use redirect permanents somehow. The "_" are hurting my rankings.
     
    SeoVeteran33, Jul 21, 2008 IP
  6. Camay123

    Camay123 Well-Known Member

    Messages:
    3,423
    Likes Received:
    86
    Best Answers:
    0
    Trophy Points:
    160
    #6
    Why dont you just submit a new sitemap with the correct urls ?
     
    Camay123, Jul 21, 2008 IP