Removing Zoints SEO (.htaccess question)

Discussion in 'Search Engine Optimization' started by tuxicy, Jun 16, 2009.

  1. #1
    Hi mates,
    For some reason, I decided to remove zoints seo from my boards. But my forum has over 200 000 google index, and I dont want to loose it.

    Now my current url's are like this:
    mysite.com/the-name-of-the-topic-t123456.html
    Code (markup):
    Without zoints, the same url will be like this:
    mysite.com/showthread.php?t=123456
    Code (markup):
    So, what is the .htaccess code to 301 redirect first url to the second one, so that I wont loose my google index.

    Best regards
     
    tuxicy, Jun 16, 2009 IP
  2. Canonical

    Canonical Well-Known Member

    Messages:
    2,223
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    110
    #2
    Maybe something like:

    RewriteCond $1 t([0-9]+)\.html$ [NC]
    RewriteRule (.+) showthread.php?t=%1 [R=301,L]

    Haven't tested it though... Just winging it.
     
    Canonical, Jun 16, 2009 IP
  3. tuxicy

    tuxicy Member

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    Thanks mate,
    But it did not work :(
     
    tuxicy, Jun 16, 2009 IP
  4. tuxicy

    tuxicy Member

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #4
    By the way, any other way not to loose my index is also appreciated :)
     
    tuxicy, Jun 16, 2009 IP
  5. tuxicy

    tuxicy Member

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #5
    Well, sorry for flooding.

    With the above .htaccess code, it redirects like this:
    http://mysite.com/home/admin/domains/mysite.com/public_html/showthread.php?t=38711
    Code (markup):
    maybe you can see what is wrong
     
    tuxicy, Jun 16, 2009 IP
  6. Canonical

    Canonical Well-Known Member

    Messages:
    2,223
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    110
    #6
    Sorry I'm used to working w/ ISAPI Rewrite on IIS which is about 99% compatible w/ Mod Rewrite.

    You may need to include the following directives at the top of the .htaccess file:

    NOTE: I also added the http://www.mysite.com/ to the target URL inside the RewriteRule. Should not have omitted that previously.

    I am assuming the rules have been placed in the .htaccess in the root of your web.
     
    Canonical, Jun 16, 2009 IP
  7. tuxicy

    tuxicy Member

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #7
    Yesss
    it worked
    thanks a lot
     
    tuxicy, Jun 16, 2009 IP
  8. Canonical

    Canonical Well-Known Member

    Messages:
    2,223
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    110
    #8
    My pleasure.
     
    Canonical, Jun 16, 2009 IP
  9. tuxicy

    tuxicy Member

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #9
    Well one more thing :)

    When there are multiple pages, url's are like this:(p2, p3 etc)
    http://mysite.com/centrino-t758p2.html
    Code (markup):
    The original url's must be like this, when its p2
    http://mysite.com/showthread.php?t=758&page=2
    Code (markup):
    :):)
    Thanks
     
    tuxicy, Jun 16, 2009 IP
  10. Canonical

    Canonical Well-Known Member

    Messages:
    2,223
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    110
    #10
    Try something like:

    Something like this should handle both scenarios.
     
    Canonical, Jun 16, 2009 IP
  11. tuxicy

    tuxicy Member

    Messages:
    79
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #11
    Thank you very much mate..
    Works like a charm :)
     
    tuxicy, Jun 16, 2009 IP