Home > Article > Backend Development > How to hide php suffix in apache
How to hide the php suffix in apache: first find and open the http.conf file of apache; then modify the content to "DefaultType application/x-httpd-php"; finally save the modification.
The operating environment of this article: Windows 7 system, PHP version 7.1, DELL G3 computer.
I often see some websites www.***.com/kkk or www.***.com/kkk.jsp accessed like this. In fact, kkk may be a php script file, which is hidden or confused. php suffix, so that at least others will not know that the website is written in PHP. So how to achieve it?
Hide: Save your kkk.php as kkk, and then modify the fields in apache's http.conf
#DefaultType text/plain DefaultType application/x-httpd-php
In this way, apache will use the php engine to explain that the corresponding type cannot be found in mime files (such as files without suffix).
[Recommended learning: PHP video tutorial]
The above is the detailed content of How to hide php suffix in apache. For more information, please follow other related articles on the PHP Chinese website!