How to Stop A Directory Index From Being Shown

Sometimes, for one reason or another, you will have no index file in your directory. This will, of course, mean that if someone types the directory name into their browser, a full listing of all the files in that directory will be shown, which could be a security risk for your site. To prevent against this (without creating lots of new 'index' files), you can enter a command into your .htaccess file to stop the directory list from being shown: Options -Indexes.

  • 9 Users Found This Useful
Was this answer helpful?

Related Articles

Is PHP compiled with 'enable-calendar'?

Web Calendar is available to install under 'Other Services' in the 'Fantastico or Softaculous'...

Error: register_globals is disabled in your PHP configuration

If you installed a new script and are getting the 500 error trying to load the page please see...

Can I add my own CGI scripts?

Our LINUX web servers have the capability to run CGI scripts in your own 'cgi-bin' directory....

I ordered an SSL or static IP and now my site is down.

When you order a SSL we assign a static IP to your account. A static IP is required for...

What is the path to public html in php?

The path to public html is: home/$cpusername/public_html/