| Author |
Message |
mrm83
Joined: 01 Jan 2012
Posts: 7
|
| Posted: Mon Jan 02, 2012 1:58 pm Post subject: how to not show "hiding index of /blah/" |
|
|
my site has a folder containing static images ie /images
when i hit the url site.com/images, i see my image listing! so i added indexingore* to the htaccess file in root to hide all listing..
but now when i hit site.com/images, i see
Index of /static
Name Last modified Size Description
Apache/2.2.14 (Ubuntu) Server at www.site.com Port 80
how can i not show this page? or redirect to a default page?
do i do a redirect in the htaccess file? but if i want to apply this to 10 other directories, does that mean i have to add a redirect for all those 10 directories? |
|
| Back to top |
|
bryantrv
Joined: 11 Dec 2009
Posts: 126
|
| Posted: Mon Jan 02, 2012 2:13 pm Post subject: |
|
|
indexignore is just telling it to not index those files- you want it to not generate an index at all, which is Options -Indexes .
Or you can put a generic index.html file in each directory. |
|
| Back to top |
|
xer0
Joined: 02 Jan 2012
Posts: 8
|
| Posted: Mon Jan 02, 2012 2:24 pm Post subject: |
|
|
For best practice, you should do this in your httpd.conf file.
Something like:
<Directory /your/site>
Options -Indexes FollowSymLinks MultiViews
</directory>
Remember to apply this within <Virtualhost> tags. |
|
| Back to top |
|
| |