Help me redirect old dynamic urls to new ones please...

Discussion in 'Apache' started by theWoosh, Jul 1, 2010.

  1. #1
    Hi I have a new site that replaces an old one, and all the urls need to be redirected from the form:
    www.thissite.com//profile-main.php?profileid=18
    to
    www.thissite.com/expertise_profiles.php?userid=192

    there are about 30 of these and I have expect to have to put seperate redirect/rewrite rules for each one in the .htaccess file as there is no correlation between the old parameter and the new one.

    However I have tried the the straight redirect form:
    redirect 301 /profile.php?profileid=18 http://www.zenithchambers.co.uk/expertise_profiles.php?userid=192
    without any success - it seems as though the parameters are mucking it up

    and I have also tried various rewrite rules, but I haven't found any that just do a one-to-one rewrite in this way (and I must admit I have always found mod_rewrite completely incomprehensible!).

    Anyone have any suggestions I could try?

    Many Thanks
     
    theWoosh, Jul 1, 2010 IP
  2. shrivcommediait

    shrivcommediait Peon

    Messages:
    86
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    you have to use 301 redirect to redirect the url.
     
    shrivcommediait, Jul 1, 2010 IP
  3. theWoosh

    theWoosh Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Thanks for your reply, but as you can see I have tried redirect 301 (in various forms) and they don't work. Any suggestions?
     
    theWoosh, Jul 1, 2010 IP