How to Not Allow Directory Listings

Some web hosts allow a directories contents to be displayed if there is no index file contained within that directory. This could cause a serious problem if that directory contained any sort of sensitive materials. If your hosting account is on a Unix or Linux server this problem is fairly easy to eliminate using a file called .htaccess. ServerMania is a Server Company empowered By passionate experts. ServerMania Dedicated Server hosting can be customized to meet the needs of your business. Choose from a wide variety of base configurations before customizing the hardware and software for your applications. There could be many more pros & cons but I’ve pointed out some of the major ones. Managing a web server starts as a full time job, you must constantly monitor its performance and security. This can sometimes be an exhausting task, especially if you currently have other responsibilities. Though, the control you will have over your website and its performance is rewarding enough. You no longer have to wait for technical support or approval to install a script onto the server. You can have as many websites and databases you want, as long as your hardware can handle it. You no longer have to go into the discussion forums and search for the best web host or rant about how much you hate your current host. You can even begin hosting family & friends personal websites. On my Windows PC I create a
new text document called htaccess.txt and within that file I put the following line:

Options -Indexes

That tells the webserver not to allow directory listings. I then upload the htaccess.txt file into the root folder for my domain and go in through a web based file browser or shell and rename the file to .htaccess . Windows will not let a file not have a name and just an extension so this is the simplest way to do it. A dedicated server is itself, the physical piece of hardware that your hosting provider rents to you. It has its own processor, hard drives(s), Random Access Memory (RAM) and bandwidth capability. Your website and its associated software will be hosted exclusively on this dedicated server’s hard drives. Dedicated servers allow you to install and run almost any program. They additionally allow other users, whom you have given access, the ability to connect to your dedicated hosting server and use those same programs at the same time you do. This has made dedicated servers very popular amongst internet gamers. Dedicated gaming servers offer all the same features of regular dedicated hosting servers but they are intended for less serious pursuits. The Dedicated Hosting is a type of website hosting mostly preferred by the large web sites or sites having huge amount of traffic and needs reliability and high-performance. Dislikes its high price, people still wanted to host their business websites on a dedicated server. As it is one of the oldest hosting type it trustworthy and offers high-performance, enhanced security and freedom to administer your server by your way.

Some webmasters will also create an index page for every directory but if there are alot of directories this could take time. Using the htaccess file protects every directory in the site.

This entry was written by and posted on Friday, March 14th, 2008 and is filed under Hosting.
Tagged as: apache htaccess
Follow any responses to this entry through the RSS 2.0 feed.