problems with 301 redirection

Discussion in 'Search Engine Optimization' started by zokiii, Nov 19, 2006.

  1. #1
    I moved my site from old domain to new domain.
    I implemented 301 redirection.

    All is redirecting good but I have 5 links indexed by google which have id's in URL.

    Url goes like this www. olddomain.com/food/food.php?articleid=34

    I implemented this in .htaccess
    
    redirect 301 /food/food.php?articleid=34 http://newdomain.com/food/food.php
    Code (markup):
    and with this 301 I got this : www. newdomain.com/food/food.php?articleid=34..

    I want to redirect to www. newdomain.com/food/food.php.

    How to do this ?
     
    zokiii, Nov 19, 2006 IP
  2. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Put a '?' character on the end of your newdomain url.

    Cryo.
     
    Cryogenius, Nov 19, 2006 IP
  3. master06

    master06 Peon

    Messages:
    2,806
    Likes Received:
    121
    Best Answers:
    0
    Trophy Points:
    0
    #3
    master06, Nov 19, 2006 IP
  4. ericeric

    ericeric Guest

    Messages:
    369
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #4

    very simple:
    use this as old url
    www. olddomain.com/food/

    and this as new one
    www. newdomain.com/food/
     
    ericeric, Nov 19, 2006 IP
  5. zokiii

    zokiii Peon

    Messages:
    656
    Likes Received:
    13
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You mean like this ?
    redirect 301 /food/food.php?articleid=34 http://newdomain.com/food/food.php?
    Code (markup):

    Then I must do mod_rewrite, am I right ?
     
    zokiii, Nov 19, 2006 IP
  6. Cryogenius

    Cryogenius Peon

    Messages:
    1,280
    Likes Received:
    118
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Exactly. Looks like ericeric misunderstood your question.
     
    Cryogenius, Nov 19, 2006 IP