468,321 Members | 1,676 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,321 developers. It's quick & easy.

index.html?

chunk1978
224 100+
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
3 1257
drhowarddrfine
7,435 Expert 4TB
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
224 100+
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
4,059 Expert 2GB
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.

Similar topics

8 posts views Thread by Vic Spainhower | last post: by
3 posts views Thread by Jofio | last post: by
reply views Thread by Martin | last post: by
8 posts views Thread by Rob | last post: by
7 posts views Thread by Jerome | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.