You are here: Re: what is the normal structure of your web pages on your server? « HTML « IT news, forums, messages
Re: what is the normal structure of your web pages on your server?

Posted by cwdjrxyz on 03/18/06 23:28

John Salerno wrote:
> 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
> together?
>
> 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?

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.

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация