Home>Article>Backend Development> How to hide php suffix in apache

How to hide php suffix in apache

藏色散人
藏色散人 Original
2021-03-03 18:00:30 3047browse

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.

How to hide php suffix in apache

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!

Statement:
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
Previous article:How to read php error log Next article:How to read php error log