There are several problems with .htaccess that you have.
Since BSen is linked in the comment above, you should use FilesMatch. Also, your regular expression is incorrect.
The problem with regex is that you have escaped space at the beginning, so all files should start with a space character (followed by one of the config.php, function.php files, etc.)
Also, a small explanation of Order allows you to disable the directive: http://www.maxi-pedia.com/Order+allow+deny
Try the following:
<FilesMatch "config\.php|function\.php|include\.php"> Order allow,deny Deny from all </FilesMatch>
If you want to refuse all but a few files, this will be considered as
Order deny,allow Deny from all <FilesMatch "index\.php|index\.html"> Allow from all </FilesMatch>
Ricky cook
source share