cakephp #IndexIgnore

I'm using cakephp. It's set up with standard .htaccess mod rewrites.
I don't want files listed when someone types in www.mysite.com/img.
In non cakephp sites i just drop this into my .htaccess file and it works like a charm.

<Files .htaccess>
order allow,deny
deny from all
</Files>

#IndexIgnore *
#Options -Indexes


Although it's not working.  ... here is the root .htaccess as is...

<IfModule mod_rewrite.c>
   RewriteEngine on
   RewriteRule    ^$ app/webroot/    [L]
   RewriteRule    (.*) app/webroot/$1 [L]
</IfModule>

<Files .htaccess>
order allow,deny
deny from all
</Files>

#IndexIgnore *
#Options -Indexes
koskajAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mark BradyPrincipal Data EngineerCommented:
Create an index.php or index.html file and place it in each folder you have. When somemone tries to access a folder directly, by default the index file will be displayed. You could have the index.html or .php file redirect the browser to the default webpage if a user tries to navigate to the folder contents.
0
xardas2010Commented:
You can create a .htaccess file in your /img/ directory an write there "Deny from all". Should work.
0
koskajAuthor Commented:
what a moron i was... i had the #IndexIgnore * commented out.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
PHP

From novice to tech pro — start learning today.