Need help with URL redirection using htaccess

Discussion in 'HTML & Website Design' started by TransPersonal, May 8, 2009.

  1. #1
    Hey Guys,

    I have many links on my website pointing to another site (not mine) that recently changed it's domain name. So now all those links are dead. However the extensions after the links have remained the same. So before it was:

    http://www.oldname.com/folder/page.php

    now it is:

    http://www.newname.com/folder/page.php

    So As you can see only the domain name has changed but the path structure is still the same. How can I make all the links that starts with "oldname.com" on my site redirect to "newname.com" while keeping the rest of the url the same. I want to do this through htacess and not have to change any of the links html.

    Please keep in mind:

    1. The links point to an external site (not mine) so I have no control over that site.

    2. I want the link html (<a href="">) to remain the same as it is now but the web site the visitor is taken to to be different.
     
    TransPersonal, May 8, 2009 IP
  2. alfa_375

    alfa_375 Active Member

    Messages:
    445
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    60
    #2
    Can you send or post the old and new htaccess files. So, that we can see what is going on.
     
    alfa_375, May 8, 2009 IP