Home > Backend Development > PHP Tutorial > Hide php file suffix in apache_PHP tutorial

Hide php file suffix in apache_PHP tutorial

WBOY
Release: 2016-07-21 14:57:34
Original
1038 people have browsed it

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

http: //www.bkjia.com/PHPjc/364041.htmlTechArticleIf you don’t want others to know that your website uses PHP programs for security purposes, you can configure it as follows your httpd.conf file. You can use the following methods to achieve hidden...
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template