?
Solved

index.html v......

Posted on 2012-08-12
12
Medium Priority
?
542 Views
Last Modified: 2012-08-17
I have encountered something strange.  Can you help please?
I have a file index.html which is the home page for
http://www.domain.com
I have just discoverd that if I enter www.domain.com into the address bar I get a different home page to the one I get if I enter www.domain.com/index.html.
Can you explain please and suggest what I can do to ensure only one  page comes up as the Home page.
0
Comment
Question by:digisel
  • 7
  • 3
  • 2
12 Comments
 
LVL 84

Accepted Solution

by:
Dave Baldwin earned 750 total points
ID: 38286290
Each web server maintains a list of 'default documents'.  When you enter just http://www.domain.com/ ,  it will bring up the first one in the list that actually exists in the default directory.  Either rename the other file or delete it.
0
 

Author Comment

by:digisel
ID: 38286333
I do not understand what do you mean when you say: "Either rename the other file or delete it"
If i delete http://www.domain/index.html I will not have a Home page.
What is the "other file"?
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38286350
You said you get a different home page when you enter http://www.domain.com/ .  'index.html' is not the only filename that can be used as the default page in a directory.  If your server supports PHP then 'index.php' is usually one of the options.  If your web server is IIS, then 'default.asp' is another option.  You can go into the web server setup and enter any name you want.  Your situation is that one of those other possibilities is higher on the list of default pages than 'index.html' is.  Look for other files that start with either 'index' or 'default' in that directory.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 54

Assisted Solution

by:Scott Fell, EE MVE
Scott Fell,  EE MVE earned 750 total points
ID: 38286352
Look for other files on your server such as index.htm, default.htm, default.html, index.aspx, index.asp, index.php, default.php, default.asp, default.aspx.   Typically your server is set to accept multiple types of "default" file formats that could be anything from the list or even some custom default pages. Although since you don't know what that is, I wouldn't expect that.  

If you find any of these other files on your server, copy them to a back up, then remove them.
0
 

Author Comment

by:digisel
ID: 38286363
i have looked for  index.htm, default.htm, default.html, index.aspx, index.asp, index.php, default.php, default.asp, default.aspx.  
in the wwroot directory and none appear there.  
the only one is index.html
All the files are .html
0
 
LVL 84

Expert Comment

by:Dave Baldwin
ID: 38286370
Ok, do you have a file named '.htaccess' in that directory?  What kind of web server is it?
0
 

Author Comment

by:digisel
ID: 38286374
no.  there is not a .htaccess  in that directory.
it is a windows server
0
 
LVL 54

Expert Comment

by:Scott Fell, EE MVE
ID: 38286393
If you are on a shared server, check if you have any custom error pages set up.  Check to see if you have a web.config file (the windows version of htaccess).
0
 

Author Comment

by:digisel
ID: 38286403
None of these appear in the wwwroot: custom error pages set up or web.config file
0
 

Author Comment

by:digisel
ID: 38286407
if I disable the index.html file the site goes down
0
 

Author Comment

by:digisel
ID: 38286412
i think i might have discovered the problem.
i removed the index.html extension to get to www.domain.com
I then refreshed the page and up came the same version as with the .index.html extnesion.
it would seem to be a cacheing problem.
do you agree?
0
 

Author Closing Comment

by:digisel
ID: 38306910
thanks for your help
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
When it comes to security, close monitoring is a must. According to WhiteHat Security annual report, a substantial number of all web applications are vulnerable always. Monitis offers a new product - fully-featured Website security monitoring and pr…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…
Suggested Courses

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question