•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the Site Layout and Usability section within the Web Development category of DaniWeb, a massive community of 456,533 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,886 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Site Layout and Usability advertiser: Internet Marketing Services
Views: 1919 | Replies: 7
![]() |
| |
•
•
Join Date: Oct 2007
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
I can't seem to figure this out:
So my question is: How do they accomplish this? I can't find any information whatsoever on this issue. I've lost sleep at night!
Please help!
- I go to some random Website.
- I click on a link to their portfolio page
- Then I check the URL bar to find something along the lines of "www.supercoolsite.com/portfolio"
- Now I notice there is no "index.*" file
- So I type in "www.supercoolsite.com/portfolio/index.html"
- That seems to work, but then I try index.php. That also works.
- Finally I try adding "ThisCan'tPossiblyWork.ItWon't"
- And of course that also works...
So my question is: How do they accomplish this? I can't find any information whatsoever on this issue. I've lost sleep at night!
Please help! •
•
Join Date: Oct 2007
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Last edited by EthanB : Oct 8th, 2007 at 11:00 pm.
Well, the root directory consists of several sub-directories.
Now suppose you goto 'http://www.xyz.com/dir'. The server you are using gives an option to set the default page(normally index.html or index.html), in each directory.
So of course portfolio is a folder, with files related to it, like index.html the default page. Index.html is the default web page. So whether you write 'http://www.xyz.com/dir' or 'http://www.xyz.com/dir/index.html', it makes no difference.
But note that although index.html is frequently used default, so it won't mean that its so in every case. Someone would have set it as 'home.htm' or anything else.
Now suppose you goto 'http://www.xyz.com/dir'. The server you are using gives an option to set the default page(normally index.html or index.html), in each directory.
So of course portfolio is a folder, with files related to it, like index.html the default page. Index.html is the default web page. So whether you write 'http://www.xyz.com/dir' or 'http://www.xyz.com/dir/index.html', it makes no difference.
But note that although index.html is frequently used default, so it won't mean that its so in every case. Someone would have set it as 'home.htm' or anything else.
•
•
Join Date: Oct 2007
Posts: 4
Reputation:
Rep Power: 0
Solved Threads: 0
Ah... I get it now. Thanks for your help!
Although, why would "ThisCan'tWork.ItWon't" work as well? I'm guessing it's because I started in the portfolio folder and from there appended the "ThisCan'tWork.ItWon't". And since that page doesn't exist, the server simply reverts to using the default page? Could this be a simple server configuration again?
Although, why would "ThisCan'tWork.ItWon't" work as well? I'm guessing it's because I started in the portfolio folder and from there appended the "ThisCan'tWork.ItWon't". And since that page doesn't exist, the server simply reverts to using the default page? Could this be a simple server configuration again?
The home page name for a given server is set by the server administrator, not by you. It will be the same filename for all websites on that server. For example, geocities.com has set all of the website home pages to be "index.html", with "index.htm" also working. On the other hand, my former ISP company used "home.htm" as the default name.
You must use the server's default name as your home page filename, if you want people to be able to address your site without appending a filename to the end of the url.
Other filenames must be addressed by adding the filename to the url, e.g:
The extension of a web page MUST be .htm or .html - nothing else will open your browser to display it. You don't get to pick your own extensions. They tell the computers involved what kind of file the file is, and what application the browser should open it with.
.htm and .html are web pages.
.gif is an image
.jpg is an image
.doc is a Word document
.ItWont is not associated with any application, so it won't display. It will cause an error box to pop up.
You also have to tell the browser and server where to look for the file, if it is not in your site's top-level folder. If your page is stored in the myfolder folder, then the url would have to be:
The server can't guess what you want it to do. You have to tell it where stuff is when you specify the url. And the file extension tells the browser what kind of stuff the file is.
You must use the server's default name as your home page filename, if you want people to be able to address your site without appending a filename to the end of the url.
Other filenames must be addressed by adding the filename to the url, e.g:
http://mysite.myserver.net/myfilename.htm
The extension of a web page MUST be .htm or .html - nothing else will open your browser to display it. You don't get to pick your own extensions. They tell the computers involved what kind of file the file is, and what application the browser should open it with.
.htm and .html are web pages.
.gif is an image
.jpg is an image
.doc is a Word document
.ItWont is not associated with any application, so it won't display. It will cause an error box to pop up.
You also have to tell the browser and server where to look for the file, if it is not in your site's top-level folder. If your page is stored in the myfolder folder, then the url would have to be:
http://mysite.myserver.net/myfolder/myfilename.htm
The server can't guess what you want it to do. You have to tell it where stuff is when you specify the url. And the file extension tells the browser what kind of stuff the file is.
Last edited by MidiMagic : Oct 13th, 2007 at 5:36 pm.
Daylight-saving time uses more gasoline
![]() |
•
•
•
•
•
•
•
•
DaniWeb Site Layout and Usability Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- Front Page error when opening .HTM file (HTML and CSS)
- FTP problem (PHP)
- Wamp to Lamp stack (PHP)
- Slow directory listing (Networking Hardware Configuration)
- Overview of UNIX (Getting Started and Choosing a Distro)
- Can I separate out two domains in the same hosting account with .htaccess ? (Linux Servers and Apache)
- How do I get rid of xadsjt offeroptimizer? (Viruses, Spyware and other Nasties)
- empty or delete data index file in temp internet files (Windows NT / 2000 / XP / 2003)
- Scandisc stops at "File Structure" (Windows 9x / Me)
Other Threads in the Site Layout and Usability Forum
- Previous Thread: Dreamweaver spry menu bar problem
- Next Thread: Advice sought on how to writeMembers Only access to page



Hybrid Mode