Author Topic: Create an index file  (Read 2896 times)

dantheman

  • Newbie
  • *
  • Posts: 1
Create an index file
« on: July 27, 2007, 07:33:09 PM »
 Hi I am new to web sight building so this will be easy. HOW do you create an index file. My 1 and 1 hosts say I have to create an index file before up loading the folder.  So what I did was create an HTML file and I have some pictures and a few movies associated with it. I stuck them all in file and then uploaded it.  So after typing that I am sure I am missing an important step. 

Thanks a ahead of time.   ;)

spacific

  • Sr. Member
  • ****
  • Posts: 250
Re: Create an index file
« Reply #1 on: July 28, 2007, 03:55:02 AM »
An index file is a file often called index.html that acts as the default page that is returned to the browser if the user asks only for your domain or subdomain name.  For example if a browser requests  www.mysite.com  then the web server will actually return  www.mysite.com/index.html  if this file is present.  If it (and other possible names) are not present then the web server will return a list of all files in that folder -- this is usually NOT what you want as it can cause security problems.  In fact EVERY folder in your site should have an index file even if it contains only  <html><body></body></html>.

The web server will have a list of what files to look for. Often it will look first for index.html, then index.php, then index.asp, etc.  If in doubt just use index.html. The index file in your home directory can be your home page itself, or it could of course contain a redirection to your actual home page.

Try naming the page you mention as index.html, then it should appear when you type your domain name in your browser.

Hope that helps.

JD

  • Administrator
  • FTP Guru
  • *****
  • Posts: 2157
Re: Create an index file
« Reply #2 on: July 28, 2007, 04:16:52 AM »
spacific is spot on