SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member jjilg's Avatar
    Join Date
    Jan 2004
    Location
    Austin, TX
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    file naming conventions - any defacto practices?

    What is the defacto "*.htm" naming convention for websites with lots of webpages??

    The existing website that I'm redesigning uses the filenaming convention of "index.cfm" in various folders to denote the main page for that subtopic. ".cfm" is a ColdFusion designator, but it's basically the same as ".htm". As an example (using ".htm") this works out to be:

    wwwroot: index.htm
    ..events_folder: index.htm
    ..products_folder: index.htm
    ..xxx_folder: index.htm ....you get the idea

    There are over 150 of these files in various folders. Wouldn't it be better to have unique names for each file so the name represented the content?

    Sure the webserver looks for "index" in each folder by default. But after the homepage is loaded that isn't really needed.

    thanks for any tips,
    Jeff

  2. #2
    SitePoint Member jjilg's Avatar
    Join Date
    Jan 2004
    Location
    Austin, TX
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Found a good answer in a "best practices" document. I hate answering my own question, but it's good advice so now I'm smarter. The advice follows:

    Create URLs that access directories, not files.
    You may have your files in HTML now, but next week, you may change to javascript pages or ASP or PHP or server-side includes, and thus your file extension will change. If you give the url as http://www.nwrel.org/nwedu/08-02/ rather than http://www.nwrel.org/08-02/index.asp, then when someone decides to rewrite the page as PHP, users won't be affected (hopefully).

  3. #3
    100% Windoze-free earther's Avatar
    Join Date
    Feb 2003
    Location
    Linuxland
    Posts
    2,788
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If you change file extensions, you'll probably want to put redirects from the old ones to the news ones to make sure visitors can find what they are looking for.

  4. #4
    SitePoint Member jjilg's Avatar
    Join Date
    Jan 2004
    Location
    Austin, TX
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good tip, I will. Thanks.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •