It is possible to disguise one file extension for another one. For example, let's say you want HTML files to act and be executed as PHP files, then you just need to add the following line to your .htaccess file:
AddType application/x-httpd-php .html
All HTML files will be executable as PHP: you can embed PHP code in the file. Or, you can limit to one file:
In this case, only the index.html file will be executable as PHP.
Last Revised: 2015-08-26
To hide one or more files:
Deny from all
In this example, no one would be able to view the following file types via the web: .INC, .PHP, .TPL, .SQL, and any files with the file extension that begins with ht (e.g., .htaccess and .htpasswd).
Last Revised: 2015-08-24