在apache中隐藏php文件后缀
如果不想让别人知道你的网站使用PHP程序以达到安全的目的.你可以按照下面的方法配置你的httpd.conf文件。
你可以使用下面的方法来达到隐藏的目的:
1.将PHP隐藏为其它语言
在你的httpd.conf里任意位置添加下面这一行
# Make PHP code look like other code types
AddType application/x-httpd-php .asp .py .pl .jsp aspx
2.对 PHP 使用未知扩展名
在你的httpd.conf里任意位置添加下面这一行
# Make PHP code look like unknown types
AddType application/x-httpd-php .bop .foo .133t .los .abc
3.对 PHP 使用 HTML 扩展名
在你的httpd.conf里任意位置添加下面这一行
# Make all PHP code look like html
AddType application/x-httpd-php .htm .html
重启你的apache把你的PHP文件名改为上面你所设置的文件后缀名。打开测试……
然后就可用 类似
http://127.0.0.1/index.jsp
的路径访问
http://127.0.0.1/index.php

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

Atom editor mac version download
The most popular open source editor

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

MantisBT
Mantis is an easy-to-deploy web-based defect tracking tool designed to aid in product defect tracking. It requires PHP, MySQL and a web server. Check out our demo and hosting services.

Zend Studio 13.0.1
Powerful PHP integrated development environment
