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??
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.
Good luck with that. What are you going to do? Serve text only or blank pages? You can't do anything without html.
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 . 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!
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):
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
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
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.
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
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