Forum Moderators: phranque
I hope this is the right place to post, I've read other posts relating to parts of my questions but I needed to double check everything. Hopefully someone can help!
I have a high traffic site which uses php to process secure forms and customer data. the index page is .html with no php (php only present in form pages) but I need to start capturing referrer info (which I can do with http referrer). My problem being I have over 15000 inbound links pointing to my home page either directly (www.abc.com/index.com) or indirectly (www.abc.com). Having recently made 3rd on the first page of google and yahho for our main keyword Im reluctant to change the file to .php incase it damages our seo....
Doesn anyone have any advise on the best way to go about this or any previous experience of search engines behavior when your change file extensions?
many thanks in advance
Jim
[edited by: jdMorgan at 3:25 pm (utc) on June 25, 2007]
Alternately, since I am the only person writing articles, I could just update the .html pages whenever I write a new article, but this makes for a much higher overhead.
Thoughts/suggestions?
Welcome to WebmasterWorld!
Please research this subject before changing any URL for any reason, ever. See Cool URIs don't change [w3.org].
You do not need to change .html URLs to .php URLs. Simply tell the server to parse .html files for PHP includes, and you are done.
If at some point in the future you do decide to change all your URLs anyway, then change them to be extensionless; The Web does not care what "filetype" you use, because the Web does not use "filenames" -- It uses URLs. It is the server's job to map requested URLs to server disk files (or to scripts), so only the server cares about "filetypes."
Servers inform clients of how to handle requested resources ("files") by sending a MIME-type identifier in the "Content-Type" HTTP response header. So the "filetype" in a URL is completely meaningless.
In general, you can tell Apache to handle .html files as .php in your .htaccess file using
AddType application/x-httpd-php .html AddHandler cgi-script html Jim
By changing your URLs instead of mapping the existing URLs to new files, you will lose the ranking of those old URLs and render obsolete any incoming links and bookmarks to those URLs. Only you can decide whether this is "worth it" as compared to the small ranking gain from the keyword-in-URL factor.
Jim