Converting To Wordpress - How To Redirect Old Site?

Discussion in 'HTML & Website Design' started by skaterkee, Jun 3, 2008.

  1. #1
    Ok I'm converting my site to wordpress (should have done it a long time ago) all is going well on that side of things but I've come to a problem.

    My old site design and pages is on my server root so if I type my domain www.domain.com it just goes to my site (index.php)

    The problem being wordpress also uses index.php.

    I need to redirect my old site to wordpress without replacing the original index.php with the new wordpress one.

    You see I have thousands of pages created with a news script like
    index.php?subaction=showfull&id=1210258..... on the original site

    Hope I'm making sense here. The plan is to preserve pagerank and catch all the traffic going to the index.php?subaction=showfull&id=1210258..... posts
     
    skaterkee, Jun 3, 2008 IP
  2. WebDev2

    WebDev2 Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Change your index.php into something like backup.php and make a new index.php and put in this code

    <?php
    header( 'Location: http://www.xxxxx.com/' ) ;
    ?>

    Only edit the xxxxx part and it should work and if you need to go back to your old one just remove index.php and rename your backup.php to index.php
     
    WebDev2, Jun 3, 2008 IP
  3. skaterkee

    skaterkee Well-Known Member

    Messages:
    651
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #3
    It's all on the same domain, there's nothing to refer it to, in essence I'm just replacing it, which would be fine if I didn't have pages within the index.php like index.php?subaction=showfull&id=1210258

    In fact I've made this even more complicated in my mind.

    I'm just going to have to replace it and only redirect my static pages aren't I?
     
    skaterkee, Jun 3, 2008 IP
  4. WebDev2

    WebDev2 Peon

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #4
    You can use that code to link in the same domain lets say your old stuff is in index.php and your wordpress is in yourdomain.com/wp you can just link it to /wp so when you type in domain.com it will take you to domain.com/wp

    If I'm not getting this right, where did you install the Wordpress? in the same directory or you made a new folder?
     
    WebDev2, Jun 3, 2008 IP
  5. skaterkee

    skaterkee Well-Known Member

    Messages:
    651
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #5
    I plan to move it to the root hen it goes live - that's the problem because the old site is there.
     
    skaterkee, Jun 3, 2008 IP
  6. skaterkee

    skaterkee Well-Known Member

    Messages:
    651
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #6
    I guess a second question would be, does it really matter if the site is in a directory - like /wordpress?
     
    skaterkee, Jun 4, 2008 IP
  7. q7m

    q7m Well-Known Member

    Messages:
    1,178
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    1
    #7
    You can't have both websites installed in the same folder (root). I think what you need is to redirect the existing traffic (the links to the old site) to the new one. This is what you have to do:
    1. Remove the old website from "root";
    2. Install the new website (wordpress) into "root";
    3. If you have a file named ".htaccess" go to step 4; if you don't have it, create an empty one.
    4. At the beginning of the file add a new line and enter this code: "ErrorDocument 404 http://www.yoursite.com/" (replace "www.yoursite.com" with the actual url of your domain)

    Now all the traffic from of old website should be redirected to your new index.
     
    q7m, Jun 4, 2008 IP
  8. skaterkee

    skaterkee Well-Known Member

    Messages:
    651
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #8
    Does that save link juice?
     
    skaterkee, Jun 4, 2008 IP
  9. q7m

    q7m Well-Known Member

    Messages:
    1,178
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    1
    #9
    What you mean by "link juice"?
     
    q7m, Jun 4, 2008 IP
  10. skaterkee

    skaterkee Well-Known Member

    Messages:
    651
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #10
    Like will it pass pagerank on to the new location?
     
    skaterkee, Jun 4, 2008 IP
  11. q7m

    q7m Well-Known Member

    Messages:
    1,178
    Likes Received:
    14
    Best Answers:
    0
    Trophy Points:
    150
    Digital Goods:
    1
    #11
    As I understand, you don't need to keep the old site alive anymore, right?
    The solution I gave you is transferring all of the traffic of the old site to the index of the new one. I'm not very sure how this will affect the pagerank, but it is the best solution that can be applied.
     
    q7m, Jun 4, 2008 IP
  12. skaterkee

    skaterkee Well-Known Member

    Messages:
    651
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    138
    #12
    Thanks for your help.
     
    skaterkee, Jun 4, 2008 IP