By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,625 Members | 2,261 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,625 IT Pros & Developers. It's quick & easy.

index.html?

chunk1978
100+
P: 224
hey,

i have a SUPER dumb question that i just don't know the answer to... ok... so when you goto a website, like www.oprah.com... the address will change to www.oprah.com/index.html

but other websites like www.apple.com will remain www.apple.com...

how do i situate/name the files in my site's folders so there is no need for "index.html"... i'd like to have visitors goto my internet site and the browser would only display www.mysite.com, not www.mysite.com/index.html...

anyone?
Apr 14 '07 #1
Share this Question
Share on Google+
3 Replies


drhowarddrfine
Expert 5K+
P: 7,435
It has nothing to do with how you arrange your files. This is something handled by the server. If the server sends a header out, not the html page, as text/html then the browser will display it as html. The extension doesn't matter. iow, the browser will interpret johnny.ppp as html as long as the server sends the correct header first.

The Oprah site apparently redirects to the index.html page and serves it that way. They don't have to do that but they do.

You can, too, but this is a server question. Ask on the Apache board.
Apr 14 '07 #2

chunk1978
100+
P: 224
It has nothing to do with how you arrange your files. This is something handled by the server. If the server sends a header out, not the html page, as text/html then the browser will display it as html. The extension doesn't matter. iow, the browser will interpret johnny.ppp as html as long as the server sends the correct header first.

The Oprah site apparently redirects to the index.html page and serves it that way. They don't have to do that but they do.

You can, too, but this is a server question. Ask on the Apache board.
ok thanks for the info
Apr 14 '07 #3

KevinADC
Expert 2.5K+
P: 4,059
the good news is that 99% of the time you don't have to do anything. Any document in any folder that is named index.html will by default be sent from the web server if no particular document is requested. So "www.mysite.com" will actually display the contents of "www.mysite.com/index.html" without you having to do anything. If there is no index.html document the server checks a list of default documents to see if any are there and will display one of those.
Apr 16 '07 #4

Post your reply

Sign in to post your reply or Sign up for a free account.