September 24, 200917 yr First website problem #268: Ok so Ive managed to upload my web pages to a test domain I have set up (after much head scratching). Real noob question here, but how do I manage these files so it goes straight to my homepage after entering the address in the browser? At the moment the page is appearing as index of/... and then a list of the pages and images that I have uploaded (which I can then view when clicked). Im almost there!!!
September 24, 200917 yr If you want a viewer to go to the homepage after entering just the domain url like www.your-domain.com then you need a file called index.html in the root (top level) directory as browsers look for an index file if no filename is given. There is an order which browsers search for an index file, I think it's .htm .html .php etc although most people use .html or .php So you need to name your homepage index.html or have a redirect from index.html to your homepage.html so that viewers get transferred immediately without seeing the list of files. Any directory without an index file will show the list of files to a viewer if he doesn't specify a filename. So if you have a sub-directory called images then anyone entering www.your-domain.com/images/ will see the list of images unless you either have an index file in each sub-directory (which could have no content, it's just to block anyone from seeing the list) or look for an index manager in your hosting service control panel to turn off indexing (recommended for all directories).
Create an account or sign in to comment