September 23rd, 1999, 12:58 AM
I'm looking for some advice about the pros and cons of different file name extensions for html/php documents. I'm working from the basic premise that it's not a good idea to keep changing the extension of a file because, for example, those hard-earned search engine references will be compromised if you change the name of a file in any way.
It would seem shortsighted to give a php document a .php3 file extension since php4 is just around the corner. So I tend to prefer naming any document containing any version of php with the generic extension of .phtml. However, I could go the whole hog and give all my web page documents an extension of .html - whether or not they include php. But, as I understand it, the price I pay is that non-php code must now go through the php parser regardless, thereby (marginally) slowing down access to those pages. Is that a big overhead?
Opinions anyone? Is there a recommended/preferred solution or does it just come down to personal preference?
September 26th, 1999, 02:14 PM
I used .php, but if you want to have the pages ranking on the se's (especially AltaVista) then .htm or .html is necessary.
I am changing my setup so that .htm is for normal html type and .html is for parsed php scripts.
This way the sites will fare better on the se's and I will still be able to tell them apart.
I wanted to use php on both .html and .htm but I understand this will disable server side includes which I use extensively for logging purposes.
September 28th, 1999, 12:40 AM
Thanks for your response, Paul. You have raised an issue which I had not previously considered - that certain search engines might actually ignore web pages with certain 'unrecognised' extensions.
Of course, I never submit an exact web page filename to the search engines, but didn't expect that when search engines trawl the web that certain filenames might be excluded based on their extension.
I recognise that getting a web page listed prominently on a search engine is not the panacea of web 'success', but at the same time I recognise that the more hits/business one of our hosting clients gets, the happier he/she is with our service. If I am reducing the volume of visits to a web site by using '.php3' or '.phtml' file extentions, then this is of serious concern to me. Like you, we use SSIs extensively, and it sounds like your solution is the most desirable.
Have you seen it written by Alta Vista et al that they don't index pages with non .html/.htm extensions, or is this just your personal observation?