Changing site from Html to PHP how do i forward old pages

Discussion in 'HTML & Website Design' started by Karen May Jones, Jan 31, 2009.

  1. #1
    Hi, I'm going to change a website from html to php. What do I do with the html pages? Leave them there with a link on them that visitors can click to go to the new pages? What would you do?

    Delete it and not worry about it? HELP! :)

    I know how to do a refresh/redirect in X seconds, but that's not index friendly, is it??
     
    Karen May Jones, Jan 31, 2009 IP
  2. nightmare5liter

    nightmare5liter Guest

    Messages:
    79
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Are you keeping the same content?

    If so I would keep the same page names, just name your .php files to .html and use apache handlers in cpanel or use php_flag in .htaccess to set php to parse them as php.

    There would be no messy redirects, links, and the serach engines won't see any changes.
     
    nightmare5liter, Jan 31, 2009 IP
    JoyGoRound likes this.
  3. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Definatly use the .htaccess and just have the html pages sent to the php ones.
     
    mokimofiki, Jan 31, 2009 IP
    JoyGoRound likes this.
  4. drhowarddrfine

    drhowarddrfine Peon

    Messages:
    5,428
    Likes Received:
    95
    Best Answers:
    7
    Trophy Points:
    0
    #4
    Good luck with that. What are you going to do? Serve text only or blank pages? You can't do anything without html.
     
    drhowarddrfine, Jan 31, 2009 IP
    JoyGoRound likes this.
  5. Karen May Jones

    Karen May Jones Prominent Member

    Messages:
    3,469
    Likes Received:
    290
    Best Answers:
    1
    Trophy Points:
    380
    #5
    I want to not have those messy redirects. I will need some help with the php flag in htaccess. I know only enough to mess things up :eek: . Yes, I'm going to use the existing content. The html page names are not se friendly. I made this site when I first started learning html and I had no clue what a good keyword url meant. For example I have pages like.... fun1.html, fun2.html, fun3.html. I have Titles that are pertinent, describing the type of fun on the page. title= play a crossword puzzle online, title=find the hidden picture, title=play gridlock game.
    Everytime I need to change my site, I have to go through and hand edit each page. Very messy html menu.. etc. add a page, edit ten menues.. etc YIKES.

    I would love to do this. I need to learn the magic word to type into the .htaccess file.
    I want to use a-very-good-page.php . I will use the content I already have. I already have the idea layed out in my head... BUT, I'm worried about deadends.

    PS. Thanks all!
     
    Karen May Jones, Jan 31, 2009 IP
  6. arizona39

    arizona39 Well-Known Member

    Messages:
    622
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #6
    rename from .html to .php

    done
     
    arizona39, Jan 31, 2009 IP
  7. Karen May Jones

    Karen May Jones Prominent Member

    Messages:
    3,469
    Likes Received:
    290
    Best Answers:
    1
    Trophy Points:
    380
    #7
    I want a little more than that. Plus, what about external links that are pointing to page.html?
     
    Karen May Jones, Jan 31, 2009 IP
  8. arizona39

    arizona39 Well-Known Member

    Messages:
    622
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    108
    #8
    keep that page.html there
    and add a meta tag that forwards it to page.php

    useeee your head!!!
     
    arizona39, Jan 31, 2009 IP
  9. Karen May Jones

    Karen May Jones Prominent Member

    Messages:
    3,469
    Likes Received:
    290
    Best Answers:
    1
    Trophy Points:
    380
    #9
    Ok. I have thought of that. I tried to explain it the best way I can.
     
    Karen May Jones, Jan 31, 2009 IP
  10. old_expat

    old_expat Peon

    Messages:
    188
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Change your file extensions then add this to your .htaccess file

    # rewrite.htm and.html files to.php
    rewriteRule ^([^.]+)\.html?$ $1.php [L]
    Code (markup):
     
    old_expat, Jan 31, 2009 IP
    JoyGoRound likes this.
  11. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #11
    in your htaccess file place this:

    redirect 301 /path/to/old-file.html   http://domain.tld/path/to/new-file.php
    Code (markup):
    just copy it to a new line and change the files as needed :)

    NOTE: 301 redirect is a permanent redirect so after search engines reindex they will change their info to the new locations. 301 will not give you search engine red flags because its not considered a active redirect.

    Good luck :)
     
    mokimofiki, Feb 4, 2009 IP
  12. mokimofiki

    mokimofiki Well-Known Member

    Messages:
    444
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    130
    #12
    This is a horrible idea because this is frowned on by search engines and will put up red flags decreasing search engine rankings. In some cases removing your site from the index.

    Seriously use your head lol

    refer to previous post :)
     
    mokimofiki, Feb 4, 2009 IP
  13. Karen May Jones

    Karen May Jones Prominent Member

    Messages:
    3,469
    Likes Received:
    290
    Best Answers:
    1
    Trophy Points:
    380
    #13
    I have worked extensively on the site for the last 24 hours. I finally decided to leave a hotlink on the original pages and nothing else. Also, not redirect in X seconds on the page either. Thanks everyone for helping. I have submitted a new sitemap to google. I feel like I'm starting all over. :p
     
    Karen May Jones, Feb 4, 2009 IP
  14. dickieknee

    dickieknee Active Member

    Messages:
    441
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    80
    #14
    I would have not changed from html to php as you will lose page rank, if you really need to have some php functionality then go for a sub domain and start there leaving alone your original pages
     
    dickieknee, Feb 4, 2009 IP
  15. Karen May Jones

    Karen May Jones Prominent Member

    Messages:
    3,469
    Likes Received:
    290
    Best Answers:
    1
    Trophy Points:
    380
    #15
    I didn't know what else to do. I really needed to do this to make the organization and page titles better over all. The site is over two years old... It was my first hand made site, and it really needed some cleaning up, if for nothing else but to reflect that I've learned a few things :)
     
    Karen May Jones, Feb 4, 2009 IP