IndexIgnore in htaccess

  • artcoder
  • Student
  • Student
  • User avatar
  • Posts: 89
  • Loc: United States

Post 3+ Months Ago

In the .htaccess file, is ...

Code: [ Select ]
<Directory YOUR WEBROOT PATH>
Options -Indexes
</Directory>
  1. <Directory YOUR WEBROOT PATH>
  2. Options -Indexes
  3. </Directory>


equivalent to ...

Code: [ Select ]
IndexIgnore *


Please explain. If not, which is preferred method? Thanks.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

http://httpd.apache.org/docs/2.0/mod/co ... #directory
http://httpd.apache.org/docs/2.0/mod/core.html#options
http://httpd.apache.org/docs/2.0/mod/co ... owoverride
http://httpd.apache.org/docs/2.0/mod/mo ... ndexignore

<Directory> isn't valid in htaccess context, so technically the two examples are not equivilent.

Options is valid in htaccess context if AllowOverride permits it.

IndexIgnore depends on mod_autoindex, which is what "Options [+|-]Indexes configures.

IndexIgnore is designed to prevent certain file types from being included while generating an index, but could possibly be used to work around permission restrictions on turning mod_autoindex off explicitly.
  • artcoder
  • Student
  • Student
  • User avatar
  • Posts: 89
  • Loc: United States

Post 3+ Months Ago

Oh, okay. I'll stick with IndexIgnore in the .htaccess file since it is working for my shared host's configuration. I simply wanted to prevent users from listing my files in a directory where I didn't have an index.html

Thanks.
  • joebert
  • Fart Bubbles
  • Genius
  • User avatar
  • Posts: 13502
  • Loc: Florida

Post 3+ Months Ago

You're welcome. :D

If permissions permit you should go with "Options -Indexes" instead.

It's worth seeing if it works on your setup since the difference is like cutting the power to an entire house at the breaker and placing a sign that says "no power" on the front door VS going around and manually unplugging everything in the house then leaving.

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 91 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
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.