Switching from Html to Php, how to keep links?

Discussion in 'Site & Server Administration' started by CuXe, Jun 1, 2006.

  1. #1
    Hi!, i currently have a site with html extensions in all of its pages, i've got a few hundred inbound links pointing to "index.html". I'd like to change this website from static to interactive (wordpress blog style), the only problem is that if i change from .html to .php all of my links will be broken!
    Is there anyway to accomplish this task without loosing my links?
     
    CuXe, Jun 1, 2006 IP
  2. fsmedia

    fsmedia Prominent Member

    Messages:
    5,163
    Likes Received:
    262
    Best Answers:
    0
    Trophy Points:
    390
    #2
    You could do a 301 redirect and it would keep the pagerank OR you could do something where it adds a mime-type for .html and processes as a PHP file instead. Redirecting via 301 is probably your better bet though.
     
    fsmedia, Jun 1, 2006 IP
  3. CuXe

    CuXe Peon

    Messages:
    198
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Yeap i think 301 redirect will do it, now there is just one lil' problem, what is the correct .htaccess entry for the 301 redirect?

    My .htaccess file has these lines on it:

    The first 6 lines are to redirect visitors who type mysite.com to www.mysite.com (it was a PR issue i had). If the original site was www.mysite.com (html version) and the new site is www.mysite.com (php version will i have to change this first code too?

    The 301 redirect would go after this .htaccess entry right?, or does it go inside the index.php wordpress file?:confused:
     
    CuXe, Jun 1, 2006 IP