Title: How to hide website folder or prevent it from indexing? Post by: pawel on November 21, 2008, 02:15:34 pm I need to hide content of one folder from visitors. Now, if someone goes to the folder, he or she sees a directory index. I do not provide link to my website cause it is new, but for example if you went to
https://www.example.com/folder then you would see something like Parent directory... folder1 folder2 file1 file2 file3 etc. How can I lock this directory as hidden or page not found? I want visitors stop seeing the content. Title: Re: How to hide website folder or prevent it from indexing? Post by: atari on November 21, 2008, 02:27:37 pm Hi,
Yeah, there are many ways how you can accomplish this. In any case, find some other hosting provider, Yahoo is not very flexible if you want to do some special stuff. I go with Forpsi and Station, they are not bad. In regards to preventing the access A) If you have access to your httpd.conf (server configuration) file, add the following to the <Directory> section. The IndexIgnore directive adds to the list of files to hide when listing a directory. IndexIgnore * This setting is global. If you want to disable listing for just some folders, then: B) If you can edit your .htaccess file (the one in the folder you want prevent from dir listing), insert the following: Options -Indexes This stops showing directory listings for URLs which map to the directory. C) You could also disable dir indexing completely. Find the following line in your httpd.conf and place a # in front of it. LoadModule autoindex_module modules/mod_autoindex.so This will disable directory listing completely for everyone and everywhere. D) The Allow,Deny relates to restricting access . Again, this can be either in your httpd.conf or in your .htaccess. Here is a good page on IndexIgnore: http://www.maxi-pedia.com/IndexIgnore (http://www.maxi-pedia.com/IndexIgnore) See here if interested learning about Order Allow,Deny: http://www.maxi-pedia.com/Order+allow+deny (http://www.maxi-pedia.com/Order+allow+deny) Cheers. Let us know how it goes. What is your website? Just currious. Title: Re: How to hide website folder or prevent it from indexing? Post by: martinsherman on March 05, 2013, 01:39:22 pm Please add the following lines to your robots.txt file:
User-agent: * Disallow: / It must work! |