SitePoint Sponsor |
|
User Tag List
Results 1 to 7 of 7
Thread: Best directory structure??
-
Jan 14, 2001, 11:44 #1
- Join Date
- Oct 2000
- Location
- Canada
- Posts
- 392
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I am presently in the process of revamping our website and wondering where experienced/pro webmasters prefer to place the linked menu files from their index.html page. For example our site is set up with only index.html and associated graphic wallpaper etc files in the main directory. Menu links go to a sub directory with related files kept in this directory. For example if someone clicks to look at Landscape paintings the url is artbyjudy.com/landscapes/landscapes.html. Is this the prefered way or is it better for landscapes.html to be in the main directory and link items viewed from this page to a seperate directory?
While I find it a lot tidier to keep all related items in their respective folders the reason I am considering this is so if I want to submit seperate urls to search engines for different categories of the site they are not so bulky. For the floral category it would be artbyjudy.com/florals.html instead of artbyjudy.com/florals/florals.html I would also place an index.html file in the florals directory which redirected to florals.html in the main directory in case the .html was left of and to avoid people getting the florals directory files list.
Maybe there are even better methods that I am not aware of.
-
Jan 14, 2001, 15:08 #2
- Join Date
- Jan 2000
- Location
- Charlotte, NC
- Posts
- 5,891
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I pride myself in using a very organized directory structure. Hopefully, be reading how I do it, you can get a feel of a good way to do things.
(I run a sports site). For each of our sport sections, I have a new folder. There a main /sports folder, then an additional folder for each sport, like /sports/nfl. Then, for each article, there's an additional folder one layer deeper, so you end up with /sports/nfl/articles.
I have a general folder for each type of section. /features, /community, /other, etc. All of our features go into the /features folder with their own own folder and sometimes another folder or two deeper.
Hope this helps!
-
Jan 14, 2001, 16:25 #3
- Join Date
- Jul 1999
- Location
- Lancashire, UK
- Posts
- 8,277
- Mentioned
- 1 Post(s)
- Tagged
- 0 Thread(s)
Marc, that is similar to how I structure my sites, of course it depends on how big they are. What about images though? If the site is small I have one folder called images, but if it is big then each section has its own images folder, and there is one main images folder for things like the logo which all sections share!
-
Jan 14, 2001, 17:03 #4
- Join Date
- Jul 1999
- Location
- Chicago
- Posts
- 2,629
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Personally, I have a /res folder which has the img, inc, and etc subfolders. It's for the site resources. inc is protected of course.
Then I have one script named 'a' which takes path info. For example, to get article ID 342, on page 7, in theme 3, you'd go to: /a/342/7/3. They aren't actually directories but they're much easier for people to remember than article.pl?type=article&id=6&theme=7&pageid=3.
Then I have an admin.domain.tld subdomain which links to domain.tld/admin for administrating the site.
-
Jan 14, 2001, 18:35 #5
- Join Date
- Jul 2000
- Location
- 80,000 feet below the surface
- Posts
- 1,442
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Nicky
Marc, that is similar to how I structure my sites, of course it depends on how big they are. What about images though? If the site is small I have one folder called images, but if it is big then each section has its own images folder, and there is one main images folder for things like the logo which all sections share!
However, if your site becomes big, then you need to consider how much further you'll break down your directory structure (that is, how many sub-levels you'll have); otherwise it may get to the point where you have 9-level sub-directories and it becomes very hard to manage.
-
Jan 14, 2001, 18:52 #6
- Join Date
- Dec 2000
- Location
- Ohio
- Posts
- 150
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Mine site has only a few pages and images. I put all .html files in my root directory. I have a cgi-bin folder with the type of script directly under it (ie. mail, news, forum), in those folders I have that program. I also have an images directory in my root directory. And that's about all.
-
Jan 15, 2001, 12:17 #7
- Join Date
- Jan 2000
- Location
- Charlotte, NC
- Posts
- 5,891
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Originally posted by Nicky
Marc, that is similar to how I structure my sites, of course it depends on how big they are. What about images though? If the site is small I have one folder called images, but if it is big then each section has its own images folder, and there is one main images folder for things like the logo which all sections share!
Bookmarks