Forum Moderators: phranque

Message Too Old, No Replies

Disable "Index of"

Apache problem

         

nofx

10:14 pm on Jan 19, 2005 (gmt 0)

10+ Year Member



Hello, i installed apache webserver. Everything seems to work fine but i have this little problem. When i do, [127.0.0.1...] then it shows the webpage of index.htm or .php but when enter a folder name like [127.0.0.1...] then it shows the whole list of images i have in that folder. I want to turn this off. But how can i do this?

bcolflesh

10:16 pm on Jan 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Add an .htaccess file to your web root with the following in it:

Options -Indexes

<edit>
...and welcome to WebmasterWorld.
</edit>

nofx

10:33 pm on Jan 19, 2005 (gmt 0)

10+ Year Member



sorry, i probably did something wrong but what i tried didnt work. I created a file called images.htaccess cause thats the name of the folder. And i added the <edit> webmaster </edit> stuff in it. But it still shows the "index of" Is there anything i need to change in my httpd.conf? I changed something that had something to do with .htaccess but after i tried to view my page again my apache server crashed.

bcolflesh

10:35 pm on Jan 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[httpd.apache.org...]

Ignore the <edit> stuff - your file has to be named:

.htaccess

- you can also turn off Indexes if you have access to the httpd.conf, then you won't need the .htaccess method

[webmasterworld.com...]

nofx

10:44 pm on Jan 19, 2005 (gmt 0)

10+ Year Member



thanks alot, it works now.