#1
  1. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    0

    .htaccess Redirect Problem


    Hey guys,

    New to SEO and redirecting using .htaccess. After googling the problem. I can't find a way to redirect my php variable (GET) files to a new permanent (301) link. Any help would be appreciated. Thanks!

    I wanna 301 redirect:

    www.mysite.com/folder/item_old.php?pid=apple

    to

    www.mysite.com/folder/item_new.php?pid=1

    Is this even possible? Can it be redirected manually for each link considering the variables are different?
  2. #2
  3. SEO Consultant
    SEO Chat Genius (4000 - 4499 posts)

    Join Date
    Jul 2004
    Location
    Minneapolis, MN, USA
    Posts
    4,210
    Rep Power
    979
    Sounds like you need a conditional rewrite.

    You can do a single 301 redirect for each case, but it would be much more efficient to do a conditional rewrite.

    The code you will use depends a lot on your old and new structure.
  4. #3
  5. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    0
    Tstolber,

    I don't mind doing a single redirect for each case, but when i try it, it doesn't work.

    Here is what I tried:

    redirect 301 /folder/item_old.php?pid=apple http://www.mysite.com/folder/item_new.php?pid=1

    any ideas?
  6. #4
  7. No Profile Picture
    Registered User
    SEO Chat Explorer (0 - 99 posts)

    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    0
    Thanks! That worked.

Similar Threads

  1. 301 Redirect (.htaccess)...
    By tonynoriega in forum Google Optimization
    Replies: 4
    Last Post: Jul 7th, 2006, 03:43 PM
  2. 301 redirect php or asp instead of .htaccess
    By SEO-2005 in forum Search Engine Optimization
    Replies: 8
    Last Post: Dec 15th, 2005, 01:59 AM
  3. htaccess redirect
    By squize in forum Search Engine Optimization
    Replies: 10
    Last Post: May 1st, 2005, 04:33 PM
  4. Problem with htaccess redirect on non www to www
    By eclipse in forum Web Design, Coding and Programming
    Replies: 9
    Last Post: Oct 24th, 2004, 03:01 AM

IMN logo majestic logo threadwatch logo seochat tools logo