#1
  1. No Profile Picture
    spaceman
    Guest
    Devshed Newbie (0 - 499 posts)
    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?

    Thanks.
  2. #2
  3. No Profile Picture
    Paul Cotton
    Guest
    Devshed Newbie (0 - 499 posts)
    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.
  4. #3
  5. No Profile Picture
    spaceman
    Guest
    Devshed Newbie (0 - 499 posts)
    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?

    Thanks.

Similar Threads

  1. Replies: 3
    Last Post: June 19th, 2002, 05:12 PM
  2. Doing server-parsed .html only under /htdocs/
    By forefront in forum Apache Development
    Replies: 3
    Last Post: January 26th, 2002, 08:23 PM
  3. USING .phtml or .html for PHP Scripts
    By vu3prx in forum PHP Development
    Replies: 2
    Last Post: April 11th, 2001, 09:28 AM
  4. .phtml v.s .php3 extensions
    By thecrazed1 in forum PHP Development
    Replies: 3
    Last Post: September 17th, 2000, 10:56 AM
  5. .php3 to .html - changing extensions
    By pandemus in forum PHP Development
    Replies: 1
    Last Post: August 25th, 1999, 03:07 AM

IMN logo majestic logo threadwatch logo seochat tools logo