Forum Moderators: coopster
I am in the process of changing my clients homepage to a php page to make it more dynamic. Will this affect Google rankings and ratings?
Currently the site is doing pretty well with it's index.html page and I don't want to damage this by changing the index to a php page.
Sorry if this topic is in the wrong section...it is sort of PHP related :)
Thanks,
DFrag.
Why not just enable PHP parsing on .html extension files using .htaccess, or at the very least set up rewrites from the old filenames to the new.
Redirect /index.html [yoursite.com...]
So... For the files that cropped up most often, I put a simple redirect in htaccess and viola, they now go straight to the new Postnuke article for the old html page.
htaccess is a very useful thing. :)
Setting up redirects from the old pages to the new pages is important when making HTML to PHP changes, but not so much when you change the home page. Because links usually go to www.site.com, not www.site.com/index.html (at least, that's how I build my sites).
So to any link pointing to www.site.com when you change index.html to index.php will be transparent, as long as you have your webserver setup to load index.php as the default page in a directory when none is specified (as index.html currently is).
It does rank pages individually, you are correct. But people link to your site at "www.site.com", and your server then fetches the correct page. So Google sees the URL http*//www.site.com as the link to the home *page* of the site. It doesn't matter what the actual filename is called, as long as it can still be referenced the way Google wants to reference it, as http*//www.site.com.
This is not necessarily true for sub-pages. For instance, I may have a page link http*//www.site.com/contact.html. If I change this to contact.php, I have then changed the URL, and I would need to configure an appropriate redirect. It is the URL that is important, not the filename. If the filename is not part of the URL, then changing it won't be noticable to Google or anyone else.
messed up by me changing from html to php
In any case, as Jetboy said, don't change your page names. Just name your index page as index.html and set PHP up so that it parse .html pages. Google will have no idea.
The link provided by bcolflesh should have all you need.
Better yet, do the rewrite, but not to *.php, but rather use "cool URIs" in Tim Berners-Lee lingo.
[w3.org ]
Tom