please help - 301 redirect dynamic link

Discussion in 'Apache' started by dforeigner, Aug 16, 2010.

  1. #1
    Hi everyone,

    Apologies if the question seems silly to you guys, I'm a newbie and I'm not sure of what I'm doing.
    Basically what I'm trying to do is 301 redirect the url

    http://www.example.com/do/ecco/view_item?listid=2&listcatid=1&listitemid=266

    to

    http://www.example.com/safari-lodges/bwindi-lodge

    For days now I've been reading and trying to find a solution but I don't seem to find something that works for me anywhere.
    At the moment I have to following on my htaccess file:

    RewriteEngine on
    RewriteCond %{QUERY_STRING} ^(.*)listid=2&listcatid=1&listitemid=266$
    RewriteRule ^do/ecco/view_item$ safari-lodges/bwindi-lodge? [L,R=301]

    I've tried endless variations of this.
    Thanks in advance. Any help will be much appreciated.
     
    Last edited: Aug 16, 2010
    dforeigner, Aug 16, 2010 IP
  2. dforeigner

    dforeigner Guest

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    I've managed to make this work.
    For those having the same issue as me, I basically used:

    RewriteEngine on
    RewriteCond %{QUERY_STRING} listid=2&listcatid=1&listitemid=266
    RewriteRule /do/ecco/view_item /safari-lodges/bwindi-lodge/? [R=301,L]
     
    dforeigner, Aug 16, 2010 IP