.htaccess: Restricting access to all *.php files except index.php

by Yang Yang on October 18, 2012

<Files *.php>
    Order Deny,Allow
    Deny from all
    #Allow from 127.0.0.1
</Files>

<Files index.php>
    Order Allow,Deny
    Allow from all
</Files>

The 2 <Files> directives must be in the exact same order as above.

Comments on this entry are closed.

Previous post:

Next post: