i have just converted my site from standard html to php pages. but i have not uploaded it to server yet, i was wondering if should i leave my html pages on the server as they are already indexed. i dont want people finding 404 on my site.
The absolute best thing you can do is redirect the old pages to the new pages with a 301. If you keep both the html and php up there, then you are going to get penalized for duplicate content.
One way is to edit your .htaccess file. For each page you'll need this line of code redirect 301 /oldpage.html http://www.yoursite.com/newpage.html
i have changed all my pages to .php my whole site, this is the problem. when someone comes to my index.html or article.html page they wont find those pages because they are now index.php and article.php etc.
i dont have a .htaccess file. would i have to create a page for each old .html page and put a redirect script on each of them?
thanks for the advice so far! can i check this out with you all? i need to do the following? 1 create a file and name it .htaccess 2 edit the file so that each page has an equivalent line of code like so; redirect 301 /oldpage.html http://www.yoursite.com/newpage.html 3 upload the file to my server thats it! all my old pages will redirect to my new pages? my appologies for spelling out what may be obvious to some people but this is new to me and i dont want to get this wrong.
Step 2 is almost correct, the new page will be http://www.yoursite.com/newpage.php because you've changed it to php.
one other thing, where about on the server should i place my .htaccess file? in htdocs directory or outside
Put it in the folder directory where your index for the site is located, and you should be good to go.
Another option would be to resave your PHP files as .html files (sounds crazy and stupid, I know), and then have Apache parse those HTML files as if they were PHP scripts.
problem solved. thanks everyone who helped. here is how. convert doctype to transitional move <include php> out of page header set body width to 100% set left column width 25% set right column width 75% set header width 100%