<FilesMatch "\.php$">
Deny from all
</FilesMatch>
<FilesMatch "index\.php">
Allow from all
</FilesMatch>