Forum Moderators: coopster

Message Too Old, No Replies

re-writing urls to .html to keep Page Rank

update pages to php and keep .html extentsion for page rank

         

Emily_Gems

5:48 pm on May 28, 2009 (gmt 0)

10+ Year Member



Hello,

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.

jdMorgan

6:49 pm on May 28, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



By changing your pages' contents from HTML to PHP and telling your server to parse HTML pages for PHP, you incur some extra CPU overhead when each page is served. But by doing this, there is no change at all to the pages' URLs, so there is no impact whatsoever on your pages' PageRank due to switching to PHP.

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

Emily_Gems

2:34 pm on Jun 1, 2009 (gmt 0)

10+ Year Member



Thank you for your response. The only other question that I have is - by taking all of my products and putting them into a database I am going to create a lot of extra code on my pages.

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?

g1smd

2:37 pm on Jun 1, 2009 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



You have a lot of PHP code in your files, but that code is executed by the server, not sent to users browsers.

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.