1

I've recently been tasked to code a new site. The following is the URL for the site:

http://www.iss.guild.uwa.edu.au/2011/

As you can see going to the above URL will only lists the available files and folders in it. I want to get the server to autoload the index.html file like in www.iss.guild.uwa.edu.au/2010/

0

1 Answer 1

2

I see that your site is using apache. In the apache configuration file, add this line:

DirectoryIndex index.html

and restart apache.

5
  • Sorry if I'm being obtuse but how exactly do you do that? Commented Jan 5, 2011 at 8:17
  • Oh and I don't exactly have full control of the server. I'm just given the storage space, I can't touch anything else. Commented Jan 5, 2011 at 8:24
  • 3
    Upload a file called .htaccess in the root directory with that line DirectoryIndex index.html. Note that: AllowOverride must be set to yes in the apache configuration file. If it is not, then you will have to ask the client to do one of the following 1) Put the DirectoryIndex line in the apache config and restart apache himself. 2) Atleast set AllowOverride appropriately. But first, try uploading the .htaccess file to see if it works for you
    – JP19
    Commented Jan 5, 2011 at 9:13
  • 1
    It also might be worth adding Options -Indexes so that it doesn't show up the directory listing Commented Jan 5, 2011 at 10:39
  • Yup it works now thanks JP19. Oh and thanks for the tip too Piers. :) Commented Jan 5, 2011 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.