Best practices for file structure

I have a new reseller account at JodoHost and need some insights about the best way to structure the file systems for client sites. At my last hosting provider, they used a folder called httpdocs under the main or root folder for the site. This folder held the index.html file and most of the other related folders under it, such as html, assets, etc. The html folder held all of the other pages for the site and the assets folder held images, java scripts, etc.

What do you recommend as the best structure to use here?

Thanks for any tips or insights.
 
it goes like this, when you create an account, a folder with the accountname is created, i.e.

user01

user01 has a domain, somedomain.com, so hsphere does it like this
Folders:
user01
->somedomain.com

User01 adds newdomain.com, so it looks like this:
user01
->somedomain.com
->newdomain.com

User01 adds a subdomain support.newdomain.com:

user01
->somedomain.com
->newdomain.com
->support.newdomain.com

As you can see,hsphere create each domain(or sub) in its own little folder, inside that domain will be a base set of index.htm and login.htm, the user can delete these if they wish and put their own, some users choose instead to rename them, it is their option.
 
Personally I dislike putting HTML files in some special directory.

I try to keep page URLs readable and logical.
Images have a subdirectory 'img'.
Layout related files such as CSS and layout images go into their own directory.
Javascript sources go into their own directory.
Server side scripts go into their own directory, usually 'lib', 'phplib' or 'asplib'.

This is just how I do it on hobby projects. On the job we use a rather weird system tbh :)
 
This is how I do it;

- root folder (yourdomain.com)
|
| - assets (folder)
|- images (folder)
|- scripts (folder)
|- css (folder)
|- library etc. (folder)​
| - home (folder)
|- web page (html, asp, php etc.)
| - includes (folder)
|- usually for dynamic content automation
| - etc. (folder)
|- other web pages
index page (e.g. splash/enter page or redirect to a folder)
 
Back
Top