allowing index access only with .htaccess
Posted
by YsoL8
on Super User
See other posts from Super User
or by YsoL8
Published on 2010-05-10T14:40:48Z
Indexed on
2010/05/10
14:44 UTC
Read the original article
Hit count: 394
Hello
I have this in my .htaccess file, in the site root:
Options -Indexes
<directory ../.*>
Deny from all
</directory>
<Files .htaccess>
order allow,deny
deny from all
</Files>
<Files index.php>
Order allow,deny
allow from all
</Files>
What I'm trying to achieve is to block folder and file access to anything that isn't called index.php, regardless of which directory is accessed. I have the folder part working perfectly and the deny from all rule is working as well - but my attempt to allow access to index.php is failing.
Basically could someone tell me how to get it working?
© Super User or respective owner