I want to add some PHP code to one of my sites in the home page. What will be the impact if I just rename the index.htm to index.php? Most of my links are just direct to the site, not to a particular page, but obviously Google has www.mydomain.com/index.htm already indexed. Does Google automatically look for index.php if the index.htm is no longer available?
Why not just push *.htm through the PHP interpreter? In .htaccess: AddHandler application/x-httpd-php .htm
if you do want to rename your index, though, you can make index.html 301 to index.php but just for the record, you should probably ask people to link to your root directory (www.domain.com) instead of www.domain.com/index.html
That's what I do. I always just get links to the root directory - that is why I wondered if I even needed to do anything. However, XML's suggetsion seems like an easy option, because I then don't have to rename anything.
I renamed all my sites from htm to php (didn't know about the other options)... The PR on my root directory remained unchanged, but my internal links to index.php showed up PR 0 for months, and it has taken months for my other pages to recover
You can, but, unless all (or nearly all) the site pages formerly .htm are now .php, there's a fair-sized performance hit. As I was just remarking on another forum, of many terrible and unfair things that Google does that is very possibly the most terrible and unfair. You can have been doing business for ten straight years with a whole site located at www.mywonderfulsite.com/myspecialstuff/, and have PR 6 and PR 5 pages all over--but move that lot ensemble to www.myspecialstuff.com, with a perfectly regular (and Google-recommended) 301 Redirect, and you're dead meat--for both old and new names--for months. Very nice, good mastersss, yesss, sso very fair, good mastersss.
I changed my page name from index.html to index.php and my ranking were not heart at all. But to be on safe side you use 301 redirct
I would like to rename my pages from .htm to .php. I only have 5 pages right now, the website has only been up for a little over a month. Google and other search engines have indexed it, but by what you ladies and gentlemen have said it shouldn't hurt for me to change the extension, correct? Quick question, what should I do as far as this "301 redirect" that some have mentioned? For example, I would like to change the existing pages index.htm and contact.htm to index.php and contact.php.