haibec Posted September 16, 2006 Share Posted September 16, 2006 Hi GuyS!My Webserver include two servers are running APACHE. one Server used save Pictures . That server include my code . With server picture . Member can browser folder images! I want not alow user browser folders images.Please help me! Link to comment Share on other sites More sharing options...
boen_robot Posted September 16, 2006 Share Posted September 16, 2006 Simply disable the dir module. To do that, find the line: LoadModule dir_module modules/mod_dir.so and place a sharp (#) in front of it.Note that this will disable ALL directory listings and your users will be requred to explicitly type in the file names of the HTML files.To avoid this, put your HTML files in another directory, and in your configuration file add: <Directory /your-folder>LoadModule dir_module modules/mod_dir.so</Directory>If you want to avoid the need for an extra folder, you may create an alias for that folder, and with an .htaccess file, restore the proper URL on eah subfolder. The other way is to use mod_rewrite, but I'm too new to it to describe it right now. Not to mention that (as far as I'm aware) there's a performance hit with it.By the way, I barely understood what you want. You need to practice English a little.[edit] YES! YES! What I'm saying does exactly that! [/edit] Link to comment Share on other sites More sharing options...
haibec Posted September 16, 2006 Author Share Posted September 16, 2006 Hi GuyS!My Webserver include two servers are running APACHE. one Server used save Pictures . That server include my code . With server picture . Member can browser folder images! I want not alow user browser folders images.Please help me!DETAIL :Hi friendsI’m trying to disable the browse directory option on Apache 2.0.43, I don’t want users to list any files, under directories without an index.html .Does anyone know how can I accomplish this?Any help will be really appreciated...Best regards Link to comment Share on other sites More sharing options...
skym Posted September 16, 2006 Share Posted September 16, 2006 Options All -Indexesin .htaccess file. Link to comment Share on other sites More sharing options...
boen_robot Posted September 16, 2006 Share Posted September 16, 2006 Damn, I forgot this. How could I? Shame on me !To complete skym's reply, add a file in the image's folder called ".htaccess", open it and place the following content in it: <Directory /your-images-folder>Options All -Indexes</Directory> I would suggest that you put that inside your main configuration file though. Scince it's your own server and you have access to the configuration settings, there's nothing stopping you and besides, it's better for performance reasons. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now