|
It's just a different extension.
Hide PHP
In general, improving security through hidden means is considered to be of little use. In some cases, it is worthwhile to add as much security as possible.
Some simple methods can help hide PHP, which can make it more difficult for attackers to find system weaknesses. Setting expose_php = off in the php.ini file can reduce the useful information they can obtain.
Another strategy is to have the web server use PHP to parse different extensions. Whether through .htaccess files or Apache configuration files, you can set a file extension that can mislead an attacker:
# Make PHP look like other programming languages
AddType application/x-httpd-php .asp .py .pl
# Make PHP look like unknown file type
AddType application/x-httpd-php .bop .foo .133t
# Make PHP code look like HTML page
AddType application/x-httpd-php .htm .html
For this method to take effect, you must change the extension of the PHP file to the above extension. This improves security through concealment, although the defense capability is very low and has some disadvantages. |
|