-=PCTechTalk=- Re: website, little red x again for pictures

  • From: ~OoO~ <SirTroth@xxxxxxxxxxxxxx>
  • To: cristy <pctechtalk@xxxxxxxxxxxxx>
  • Date: Fri, 27 Aug 2004 18:44:19 -0400

All a webpage is is a text document with code that tells a browser how to 
display text or images. In an HTML file, you would or could have links to other 
pages (which you already know). With the exception of a few other extensions, a 
browser is generally looking for a file with an .html or .htm extension (will 
explain the difference in a sec).
When you go to a website, the browser wants to know where the .html or .htm 
file is.
If you type this in:
http://www.domain.com/index.html
then it'll get the index.html file located in the root directory (the main 
directory).

If you type in:
http://www.domain.com/alpha/index.html
then it'll get the index.html file located in the directory called "alpha" 
which is located in the root directory.

Now... let's say you type this in:
http://www.domain.com
The browser is not given a file to look for, so it checks with the server to 
see what the default file is. For the most part, most servers have the default 
file as index.html and index.htm. This is decided by the server, and can be 
pretty much anything. And, for Apache servers and your own shared hosting (not 
the free ones you get from an ISP) you can usually change this yourself for 
your specific domain.

So... with the above example.
http://www.domain.com
Since the browser is not given the file, it automatically goes for the default 
file, and in this example we'll say its index.html, so that's the one it'll 
load up. If that index.html file is not there, then you'll get a 404 NOT FOUND 
error, which basically means the file is not there.

If you type in:
http://www.domain.com/alpha
Same thing... no file name, so the browser goes to the default, and will 
automatically look for:
http://www.domain.com/alpha/index.html

Here's another thing... most servers, by default, are set up that if there's no 
default file, the browser will display everything in that directory. For 
example, if you type in:
http://www.domain.com
the browser will look for index.html. If it doesn't find it, it will just show 
you a file directory of everything in that directory. Want an example? Here's 
one of my domains.
http://www.sirtroth.com/images/
Notice when you click that, you'll see a file directory of everything in the 
images folder, because I do not have an index.html file in there.

This can usually be changed on the control panel of your hosting service.

Lastly... the difference between .html and .htm ... Back in the days, in the 
DOS days, 3-letter extensions were used, so putting .html still yielded .htm. 
Now mainly .html is used. Which you use makes no difference. They both work 
equally well.
:o)

---Troth


::: Original Message
::: Sent Fri, 27 Aug 2004 14:33:47 -0400 by cristy
> Hi Hank,
>
> I am understanding that I can have different folders, each having its own
> index.html, like naming one folder music and inside that folder having an
> index.html?  And having a folder for Personal Web site with an index.html,
> etc..? What is the diff between having html or htm extension, none?  Why are
> there two of them?
>
> cristy
>
>
> ----- Original Message -----
> From: "Hank" <hank@xxxxxxxx>
> To: <pctechtalk@xxxxxxxxxxxxx>
> Sent: Friday, August 27, 2004 1:13 AM
> Subject: -=PCTechTalk=- Re: website, little red x again for pictures
>
>
>> Sorry I went to sleep awhile. Yep your main page will always be
> index.html.
>> I save my pages in a folder named as where they are on line. I have
>> index.html and want to change it I rename index.html to oldindex.html and
>> the new one is now my index.html, If I make a mistake I can delete the new
>> one and still have the old one. When you upload to your site ,Most but not
>> all will overwrite without asking, just be sure by going to your site and
>> checking that it is right.
>> Cristy I know this is hard at first but it will get easier as you learn. I
>> have a lot of index.html, I have one for my hdka.com and one for my
>> hdka.com/mena one for my hdka.com/mid one for my hdka.com/vocal, do you
> see
>> for each folder I have on line I can have an index.html. I will confuse
> you
>> more now you can have an index.html and an index.htm in the same folder on
>> line and the index.html will open if you don't ask for the index.htm. Like
>> if I type hdka.com in the address bar then I get the index.html for
> hdka.com
>> if I type hdka.com/index.htm then I would get a dif file.
>>  Yours Hank
>>
>> ----- Original Message -----
>> From: "cristy" <poppy0206@xxxxxxx>
>> To: <pctechtalk@xxxxxxxxxxxxx>
>> Sent: Thursday, August 26, 2004 9:58 PM
>> Subject: -=PCTechTalk=- Re: website, little red x again for pictures
>>
>>
>> Hank, shouldnt I still save the first webpage in notepad as index.html?
>>
>> cristy
>> Im trying a basic page now in notepad.  Then I can just use my FTP and
>> upload it to my Cox.net personal webspace.
>>
>>
>> ---
>> Hank's outgoing mail is certified as Virus Free as can be
>> Checked by AVG anti-virus system (http://www.grisoft.com).
>> Version: 6.0.744 / Virus Database: 496 - Release Date: 8/25/04
>>
>> To unsub or change your email settings:
>> //www.freelists.org/webpage/pctechtalk
>>
>> To access our Archives:
>> http://groups.yahoo.com/group/PCTechTalk/messages/
>> //www.freelists.org/archives/pctechtalk/
>>
>> For more info:
>> //www.freelists.org/cgi-bin/list?list_id=pctechtalk
>
>
> To unsub or change your email settings:
> //www.freelists.org/webpage/pctechtalk
>
> To access our Archives:
> http://groups.yahoo.com/group/PCTechTalk/messages///www.freelists.org/archives/pctechtalk/
>
> For more info:
> //www.freelists.org/cgi-bin/list?list_id=pctechtalk


To unsub or change your email settings:
//www.freelists.org/webpage/pctechtalk

To access our Archives:
http://groups.yahoo.com/group/PCTechTalk/messages/
//www.freelists.org/archives/pctechtalk/

For more info:
//www.freelists.org/cgi-bin/list?list_id=pctechtalk

Other related posts: