I need to change a few of my pages from index.html to index.php. Are there any consequences when changing file extensions? Will this affect my PR or backlink count? Does anyone have any experience with this? Thanks!
These changes will effect your PR for sure, you should use 301 redirect to redirect from you old pages to the new one to prevent you lose your page PR and to maintain your cached pages in Google. If you don't do redirect then bot will crawl your old pages, when not found, they'll mark this page as 404 error and that's not good for your site overall.
Yes these will effect your PR, because .html pages are indexed and .php will be new for google, You can try a mod rewrite to redirect or rewrite php urls to .html urls
if google had alreadyy indexed that pages, then it'll be considered a missing link. index.htm and index.php are essentially 2 different files...
If you will change extensions manually then it will effect a lot based on how good they are already performing.
So I'm assuming that the number of backlinks would remain the same since I'm only changing my index files, and these backlinks point to mydomain.com and NOT mydomain.com/index.html, am I right? The only thing that would be affected is my PR, which would only be temporary until the new PR is calculated, right?
If you want to use PHP on your pages without losing backlinks and PR wouldn't it be a simpler idea to get your server's PHP engine to parse htm and html files and avoid renaming them? As I understand it, this can be achieved by uploading an .htaccess file with the following content:- RemoveHandler .html .htm AddType application/x-httpd-php .php .htm .html
Yes, I've considered using this method for just the index files and then have Apache parse the other files as plain html. I think this would be the easiest, not to mention less stressful approach. The only thing I'm concerned about, is that some people have told me that this causes a download prompt in some browsers? However, I don't really understand this. Can someone shed some more light on this topic?
I've never heard of that and I am inclined to believe that it is untrue. However, I am by no means an expert. The way it works in my understanding is this... When a PHP file is parsed by the server's PHP engine it is then passed to the client's browser as good old HTML - therefore there will be no download prompt unless the HTML page contains a link to some other file format. T
I had never heard of it either, until I recently read a thread here: http://www.php-editors.com/forums/showthread.php?p=7761 I also read some threads about this on Webmaster World as well. It's hard to understand the logic behind this, because the .htaccess file controls everything on the server side, therefore it can't be a client side browser issue, right? Weird stuff.
Ok, I "think" I understand how it works now. According to DrBacchus’ Journal at: http://wooga.drbacchus.com/?p=843 So in other words, with some browsers, the AddType directive somehow invokes a file download prompt because it associates a Content-Type with a file extension, in turn confusing the browser as to how the file should be treated?
Great link - that seems to clear it up (although I haven't tested it yet). So now it seems you can avoid renaming your files and your problem is solved! T
Yes, problem solved! Thank you all for your help. Although I'd still like to learn more about 301 redirects. This thread is already starting to go off topic, so I'll start another thread in the future.
When a PHP file is parsed by the server's PHP engine it is then passed to the client's browser as good old HTML - therefore there will be no download prompt unless the HTML page contains a link to some other file format.