what is the normal structure of your web pages on your server?

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
Out of curiosity, is there any kind of standard practice for where
html/php/asp, etc. pages get stored on a web server? What I mean is,
when you upload your pages, do they all get put in a root directory? Or
an 'html' folder? Do you separate your PHP/ASP etc. files into a
directory that is separate from the HTML files? Or are they all put

I ask this because I just signed up for a Python package, but it
requires that the PSP (Python Server Pages) files be put in a folder
called 'python'. There is a separate folder for html files called
'htdocs'. Now, I could, if I wanted, put all my files in the python
folder and just use that, but if I use the separate folders, then any
links to my pages would require this: ../htdocs/file.html and that does
not seem portable to other servers.

So when you write your static html pages and your dynamic PHP etc.
pages, do you put them all together so that the links to them are simply
the file name itself? Or should they be split into appropriate folders?

Thanks, hope that made sense!


Re: what is the normal structure of your web pages on your server?

John Salerno wrote:
Quoted text here. Click to load it

A few hosts on certain types of servers may require that you use a
special cgi bin, etc for a few things. However, for most web pages, you
can store things in just about any way you wish that works for you.
Storage space is now dirt cheap on the better commercial hosts. Thus I
do not make separate directories for images or short audio anymore. I
just put these files in the same directory with the main page that uses
them. Thus you can use very short relative URLs for the images, audio,
etc. This makes everything very easy if you decide to reorganize your
site, backup to your computer, or change hosts. You may have to repeat
the same images, audio etc if they are used in more than one page in
different directories, but that is usually no problem anymore. The one
exception I sometimes make is if I am using streaming media on
broadband that runs to a very high MB size - say 20 or more MB. In such
a case, I may store such media in a streaming media directiory to avoid
repeating it in various directories with pages that use it.

Re: what is the normal structure of your web pages on your server?

cwdjrxyz wrote:

Quoted text here. Click to load it

Yeah, I think this is what I'd like to do with my web pages, at least. I
like putting images in an 'images' folder. But even if I put all of my
pages in the 'python' folder (for the sake of the relative links to
other pages), the URLs to those pages will still contain the python
folder in them, like this: http://www.something.com/python/page.html ,
which seems weird to me.

Site Timeline