Caveat: No space after the comma in the Order line. To allow access to files
matching *.css or *.js use this directive:
I asked this question and I think, I have found the answer. The following code to
be appended in .htaccess of public_html
If you'd like to deny all but a few files, this would read as. Order deny,allow Deny
from all
Second – in the same directory create a file named .htaccess with the following
content.
Order allow,deny. Allow from all. Satisfy any.
php)$ $1 [L] RewriteRule . index.php [L] # END WordPress
You pretty much will disable php to work on your site admin. On wp -admin there are files being executed when entering the admin side of the site.
Maybe you are thinking to complicated, just deny all access and then allow access to index.php and the folder itself. For example: Order allow,deny Deny from ...
None AllowOverride None Order deny,allow Deny from all