Question:
When you upload a website to a host...?
neil m
2011-09-30 05:09:03 UTC
... what is the purpose of files and folders. I know what files and folders do on my pc, but why have them on a website? I just want to upload the site I designed so when people type the url, they go to my site, not see a list of files and folders, parent directory, etc. (I expect this is a really stupid question, but we all have to start somewhere!)
Six answers:
2011-09-30 20:34:11 UTC
Refer to:

http://www.threehosts.com/publish



As an experienced webmaster I recommend BH web hosting which I’m sure it would work for you and fulfill all your requirements. They have a really great offer for hosting & I have used them for over 4 yrs now, and have never had a single problem with them.



You can reach reviews about this web hosting provider and its latest DISCOUNT COUPONS at:



http://www.threehosts.com/reviews/1st



Only $3.95 /month (with discount coupon)



******IMPORTANT********

* This service was awarded the “Best Web Hosting OF The Year”.

*****************************



Hope this helps.
brisray
2011-09-30 12:25:20 UTC
It's not a stupid question at all and loads of people get caught by this.



Nearly all websites use web server software called Apache to run websites. Apache has certain default actions which is what you're seeing.



By default, Apache, unless it finds a default webpage will show a listing of all the files in the directory. When installed the default webpage Apache looks for and displays is index.html. Other web server software looks for home.htm. This applies to all directories on a website, even the main directory.



Take a look at http://brisray.com you'll see a page come up, even though you haven't specified one. That file displayed is index.htm - you can check this by going to http://brisray.com/index.html



When you go to a directory that doesn't have the default page in it then you'll see a directory listing as in http://brisray.com/test/



Apache and other web server software have configuration files. Most hosts do not let users anywhere near those, but it does have options to change the default values so you can change the default page to whatever you like, such as index.htm, index.php and so on. That list of alternative default pages also determines what order the software looks for them to display. If you have index.htm and index.html in the same directory then Apache will show whichever is first in the list.



Whether the web server shows the directory listing or not is also configurable, this is why some websites show a "You do not have permission to view these files" page.



As to why wbsites have folders it's for exactly the same reason you have folders on your local machine. It's a way of organizing the files to make administration easier. If you're just starting your website you may have just a couple of dozen files. After a while you may have several thousand.
snowmanjack
2011-09-30 12:16:06 UTC
Files and folders are just a way to structure your site and related documents. For example, having all your images in a folder called /images/ keeps them together, and away from your pages (html files).



If under any directory you are seeing a list of files, you can instead put an 'index.html' file in that folder, and that will be shown instead.



If people type the url and are not seeing your site, your main page is probably not 'index.html'. Make sure you have a file called 'index.html' (without the quotes), and that is what they will see.
IT
2011-09-30 13:25:09 UTC
A basic website consists of nothing more than files and is structured in folders. Therefore you need them or you would not see a website after typing in an URL.



More advanced websites use a database in the background. However, for the end user's browser they still emulate files and folders.
?
2011-09-30 12:16:08 UTC
A browser will look for an index page - index.htm, or index.html or index.php etc. if it does not find one it will list what it has found which will be a list of files and folders (which are actually directories) on the site and a Parent directory link to the next level of the site. Make sure you have named your first page index.html.
larrybud2004
2011-09-30 12:18:25 UTC
Your website consists of those files and folders, so they have to reside on the server so the server can send them to the browser of the user accessing your website.



The server has web server software on it, such as IIS (for Microsoft server). When the network admins set up your site, they give you a folder on the server's hard drive, and that's where you upload your files. The server software then is set up to say that "www.whatever.com" points to your folder. When someone goes to your website, the server knows what files to sent to the user access your site.



Most servers are set up as "shared" environments, which means you share the server with a bunch of other of their customers.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...