Home > Article > Backend Development > Hide php file suffix in apache_PHP tutorial
If you don’t want others to know that your website uses PHP programs for security purposes, you can configure your httpd.conf file as follows.
You can use the following methods to achieve hiding purposes:
1. Hide PHP as other languages
Add the following anywhere in your httpd.conf One line
# Make PHP code look like other code types
AddType application/x-httpd-php .asp .py .pl .jsp aspx
2. Use for PHP Unknown extension
Add the following line anywhere in your httpd.conf
# Make PHP code look like unknown types
AddType application/x-httpd-php .bop .foo .133t .los .abc
3. Use HTML extension
for PHP Add the following line anywhere in your httpd.conf
# Make all PHP code look like html
AddType application/x-httpd-php .htm .html
Restart your apache and change your PHP file name to the file suffix you set above name. Open the test...
Then you can access
http:// 127.0.0.1/index.php
http://www.bkjia.com/PHPjc/364041.html
www.bkjia.com