在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

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

Notepad++7.3.1
Easy-to-use and free code editor

SublimeText3 Chinese version
Chinese version, very easy to use

Zend Studio 13.0.1
Powerful PHP integrated development environment

Dreamweaver CS6
Visual web development tools

SublimeText3 Mac version
God-level code editing software (SublimeText3)

Hot Topics

PHP 8.4 brings several new features, security improvements, and performance improvements with healthy amounts of feature deprecations and removals. This guide explains how to install PHP 8.4 or upgrade to PHP 8.4 on Ubuntu, Debian, or their derivati

To work with date and time in cakephp4, we are going to make use of the available FrozenTime class.

To work on file upload we are going to use the form helper. Here, is an example for file upload.

CakePHP is an open-source framework for PHP. It is intended to make developing, deploying and maintaining applications much easier. CakePHP is based on a MVC-like architecture that is both powerful and easy to grasp. Models, Views, and Controllers gu

Visual Studio Code, also known as VS Code, is a free source code editor — or integrated development environment (IDE) — available for all major operating systems. With a large collection of extensions for many programming languages, VS Code can be c

Validator can be created by adding the following two lines in the controller.

CakePHP is an open source MVC framework. It makes developing, deploying and maintaining applications much easier. CakePHP has a number of libraries to reduce the overload of most common tasks.

This tutorial demonstrates how to efficiently process XML documents using PHP. XML (eXtensible Markup Language) is a versatile text-based markup language designed for both human readability and machine parsing. It's commonly used for data storage an
