Grendel Posted February 17, 2003 Posted February 17, 2003 How do I turn off "show directories"? I still want people to be able to view the pages in the folders but I want to turn off the ability for them to view the folders if they dont know the direct path. Thx Quote
Lianna Posted February 17, 2003 Posted February 17, 2003 I think that what you are looking for is the Index Manager in cPanel. Click the link to Index Manager and then click the folder to which the index listing should not be shown. Then select No Indexes then click the Save button. You can still navigate to pages via directly entering them into your address bar, but will not see the directory listing if no default page exists. By default page, I mean index.htm, .html, .php, .shtml, etc. If an index.htm page does exist for a directory, it will show by default. Lianna Quote
Grendel Posted February 17, 2003 Author Posted February 17, 2003 No I tried that and thats not what I am looking for I dont think. If you type in an adderss on my site thats not really there it shows a page that does say index at the top and shows folders which you can click on to move to the files or folders inside. I would like to set the entire site to display "page not found" if you dont have a link or direct path. I know this is a real setting but I dont remember where it is or what its called. Thx Quote
Junior Posted February 17, 2003 Posted February 17, 2003 What Lianna describes will do exactly what you are looking for. If there is no index.htm or index.html file, etc., the files that ARE in that directory will not be displayed. I can't remember what the error page says, but I know for a fact, that if it is set up correctly, it will not allow the files in that directory to be displayed. Quote
Grendel Posted February 17, 2003 Author Posted February 17, 2003 Ok I did find that setting I was thinking of on one of my test servers. It was a IIS lol. "Allow Directory Browsing" I did try that indexing manager but even still I can't set that for the root directory. ? Quote
Lianna Posted February 17, 2003 Posted February 17, 2003 Simply put an HTML page on the site. Name the page index.htm. Make it say something like "This site is not available for uninvited guests" or something. As long as an index.htm page exists in your root, then the directory index (list of contents) will not display. Lianna Quote
Grendel Posted February 17, 2003 Author Posted February 17, 2003 Good one! Yeah I may end up doin that. Thanks for all the help. Quote
webmonster Posted March 6, 2003 Posted March 6, 2003 Hi all, I am new, this is my first post. I wanted to turned off the directory browsing, after reading this I put a file index.php on my root folder and it stoped showing the directory. However, I made a folder called 'images' and wanted to turn the directory browsing off here also. I went into the index manager of cpanel to see if there are options to turn it of or not. To my dismay, I found none. All I saw was the folder icons to the left, and nothing else. I tried clicking on it, but no options to turn it off. Also, the web protect feature on the cpanel is the same thing. The pages only shows the folder to the left but no options to password protect the folders. Are these an enhanced features I had to buy??? -m Quote
tastewar Posted March 6, 2003 Posted March 6, 2003 From the index manager screen, "Please select the folder you wish to protect by clicking on its name. You can navigate by clicking on icons." When you click on the name, the options appear. Quote
Head Guru Posted March 6, 2003 Posted March 6, 2003 Do it the old fashioned way, and the best way. Edit your .htaccess file add this to the top level of the file Options -Indexes No more browsing them directories. Quote
webmonster Posted March 6, 2003 Posted March 6, 2003 Thanks, I see the options for the web protect features now. I guess there is a different between clicking on the folders virsus the text links itself. I just had to get used to the navigation system. I like the idea of editing the .htaccess file. Is there a definitive source on this topic. I fould a few on the internet but what does everyone else like? -m Quote
alexfung Posted May 4, 2003 Posted May 4, 2003 Do it the old fashioned way, and the best way. Edit your .htaccess file add this to the top level of the file Options -Indexes No more browsing them directories. It is a good solution, but is the action applied to the root directory alone, or to ALL directories? If not, how do I do it for all directories? Quote
idallen Posted May 5, 2003 Posted May 5, 2003 The top-level .htaccess applies to all subdirectories unless those subdirectories also contain .htaccess files that change the settings. Quote
alexfung Posted May 5, 2003 Posted May 5, 2003 Thanks It never occured to me that it will be effective for all its children. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.