httaccess 301 help

Discussion in 'Apache' started by Notorious, Aug 12, 2006.

  1. #1
    how to redirect from

    http://www.unitedpunjab.co.uk/showthread.php?do=post_thanks_add&p=xxx
    Code (markup):
    to

    http://www.unitedpunjab.co.uk/showthread.php?p=xxx
    Code (markup):
     
    Notorious, Aug 12, 2006 IP
  2. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #2
    Just edit the link to link to the new URL.

    If you only get that after making a post, changing it won't do any good. Search engines don't make posts!!!
     
    Nintendo, Aug 12, 2006 IP
  3. Notorious

    Notorious Well-Known Member

    Messages:
    903
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    145
    #3
    there are more than 8000 "/showthread.php?do=post_thanks_add&p=xxx" links

    the links are no longer on the site but in google cache
     
    Notorious, Aug 24, 2006 IP
  4. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Cryogenius, Aug 24, 2006 IP
  5. Nintendo

    Nintendo ♬ King of da Wackos ♬

    Messages:
    12,890
    Likes Received:
    1,064
    Best Answers:
    0
    Trophy Points:
    430
    #5
    Except you would be telling it to not crawl both types of URLs, since both types of URLs are the exact same thing.

    Options +Indexes
    Options +FollowSymlinks
    RewriteEngine on
    RewriteBase /
    RewriteRule ^showthread.php?do=post_thanks_add&p=([^.]+)$ http://www.unitedpunjab.co.uk/showthread.php?p=$1 [R=301,L]

    might do it.
     
    Nintendo, Aug 24, 2006 IP
  6. Notorious

    Notorious Well-Known Member

    Messages:
    903
    Likes Received:
    24
    Best Answers:
    0
    Trophy Points:
    145
    #6
    Thanks much cyrogenius and nintendo.
    Disallow: /showthread.php?do=post_thanks* in the robots.txt is worked for me.
     
    Notorious, Aug 25, 2006 IP