allowing index access only with .htaccess

Posted by YsoL8 on Server Fault See other posts from Server Fault or by YsoL8
Published on 2010-05-10T14:40:48Z Indexed on 2010/05/10 22:44 UTC
Read the original article Hit count: 323

Filed under:
|

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?

© Server Fault or respective owner

allowing index access only with .htaccess

Posted by YsoL8 on Stack Overflow See other posts from Stack Overflow or by YsoL8
Published on 2010-05-10T13:09:51Z Indexed on 2010/05/10 13:14 UTC
Read the original article Hit count: 323

Filed under:
|

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?

© Stack Overflow or respective owner

allowing index access only with .htaccess

Posted by Oliver Nourish on Server Fault See other posts from Server Fault or by Oliver Nourish
Published on 2010-05-10T15:23:33Z Indexed on 2010/05/10 15:34 UTC
Read the original article Hit count: 323

Filed under:

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?

© Server Fault or respective owner

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: 323

Filed under:
|

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

Related posts about server

Related posts about security