Forum Moderators: coopster
I am looking at updating my site from all .html to .php so that I can update my products from a database (currently all of my pages are static and I update them one by one in the code)
My only concern is that I have a good page rank and do not want to loose it by changing my pages to .php.
I have found two solutions and want to see which one is better and why.
One solution I found was posted on this forum #3752103 - and it talks about parsing php to html through the .htaccess
The other solution that someone is suggesting to me is to do
Mod_Rewrite to search engine friendly urls.
Which one is going to work best for me? Currently my plan is to create each page individually and use queries to pull in the data by categories.
This is a large project for me and I want to make sure I do all of the research and planning I can before I get started.
On Apache servers, there is also the option of using XBitHack (see Apache mod_includes documentation), using the Owner and Group execute privilege bits to 'mark' only the .html-named pages that you actually need to parse for PHP. Using this method can greatly reduce the amount of CPU time wasted parsing HTML files which do not contain any PHP code, at the cost of more-complex administration: You have to remember to check and/or set the privilege bits when you upload an updated file to the server.
A viable approach is to use the XBitHack method during the transition from plain-HTML to PHP, and then switch to the "parse-them-all" approach once the majority of your high-traffic pages have been transitioned.
--
Using search-engine-friendly URLs is a different subject, and does involve changing the URLs, so it *will* have a temporary effect (from a few days to several months) on PageRank/link-popularity while the search engines re-index your site. This can be mitigated by the proper use of 301-Moved Permanently redirects, to tell the search engines that the requested pages' URLs have changed, and to 'recover' traffic from obsolete links from other sites and from outdated visitors' bookmarks.
The first technique is relevant to your main question, while the second is only tangentially related.
Jim
Will this hurt my PR at all? I will also be taking out a lot of code by switching from table to div tags and css.
Also, since php is a server side code does that mean that even though a product is in a database the search engine will still see it on that page correct? Example - if i have a page called - productone.php and i have products listed on that page that match the category for productone.php - the search engine will see them correct?
The user only gets to see the HTML tags and content that you send it. It is likely that you can make the code more efficient now, because to make a site-wide change, you only need to edit your script once, not thousands or tens of thousands of pages.
Search engines will find pages using the links within your site that point to those pages. So, your site needs to generate those links on the page, and then your script needs to react to the requests that arrive when those links are clicked, and serve the correct content.