Great community. Great ideas.

Welcome to SEOChat, a community dedicated to helping beginners and professionals alike in improving their Search Engine Optimization knowledge.  Sign up today to gain access to the combined insight of tens of thousands of members.

Thread: .htaccess Redirect Problem

Results 1 to 4 of 4
Share This Thread →
  1. #1
    jason360 is offline 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
    tstolber's Avatar
    tstolber is offline SEO Consultant SEO Chat Genius (4000 - 4499 posts)
    Join Date
    Jul 2004
    Location
    Minneapolis, MN, USA
    Posts
    4,115
    Rep Power
    868
    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.

  3. #3
    jason360 is offline 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?

  4. #4
    jason360 is offline Registered User SEO Chat Explorer (0 - 99 posts)
    Join Date
    Jan 2013
    Posts
    8
    Rep Power
    0
    Thanks! That worked.

Share This Thread →

Become Part of This Conversation

Join NowFor Free!

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

SEO Chat Advertisers and Affiliates