Linode Forum
Linode Community Forums
 FAQFAQ    SearchSearch    MembersMembers      Register Register 
 LoginLogin [ Anonymous ] 
Post new topic  Reply to topic
Author Message
PostPosted: Mon Jan 02, 2012 2:58 pm 
Offline
Senior Newbie

Joined: Sun Jan 01, 2012 8:55 pm
Posts: 7
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?


Top
   
 Post subject:
PostPosted: Mon Jan 02, 2012 3:13 pm 
Offline
Senior Member
User avatar

Joined: Fri Dec 11, 2009 7:09 pm
Posts: 168
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.

_________________
--
Chris Bryant


Top
   
 Post subject:
PostPosted: Mon Jan 02, 2012 3:24 pm 
Offline
Senior Newbie

Joined: Mon Jan 02, 2012 3:18 pm
Posts: 11
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.

_________________
We all start somewhere...


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
RSS

Powered by phpBB® Forum Software © phpBB Group