1

I have a website (say www.example.com) being hosted on a LiteSpeed webserver.

I've created a directory at www.example.com/media but I'm unable to list the contents and get a 404 error. How can I fix this?

MrWhite
  • 12,647
  • 4
  • 29
  • 41
Tom
  • 133
  • 8

2 Answers2

3

If this is an Apache Server you could try creating a file called .htaccess in the media directory with the following contents

Options   Indexes

If suitably configured this will allow and Apache server to provide directory listings.

user9517
  • 115,471
  • 20
  • 215
  • 297
0

Typically directory listings are generated by the web server itself, and that feature may be disabled on your host (and it's often good that it's disabled, for security reasons).

If you have access to the control panel for the web server, you may be able to enable the setting yourself. Unlikely as you indicated you have been provided with hosted space.

You can work around it by creating a PHP file which will list out the contents of your chosen directory. See the instructions for this here.

Chris Thorpe
  • 9,953
  • 23
  • 33