
PHP网址怎么隐藏后缀
首先htdocs根目录下创建文件htaccess并写入规则将URL重写;
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME}\.php -f
RewriteRule ^(.*)$ $1.php [L]然后打开Apache配置文件,将rewrite模块开启,并将AllowOverride后边None改为ALL;


最后重启Apache服务即可;
推荐教程:《PHP教程》
The above is the detailed content of How to hide suffix in PHP URL. 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

Hot AI Tools

Undress AI Tool
Undress images for free

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

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

Clothoff.io
AI clothes remover

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

Hot Article
Oguri Cap Build Guide | A Pretty Derby Musume
3 weeks agoByJack chen
Agnes Tachyon Build Guide | A Pretty Derby Musume
3 weeks agoByJack chen
Grass Wonder Build Guide | Uma Musume Pretty Derby
2 weeks agoByJack chen
PEAK How to Emote
4 weeks agoByJack chen
How to Fix KB5060829 Not Installing & Other Reported Bugs
3 weeks agoByDDD

Hot Tools

SublimeText3 Chinese version
Chinese version, very easy to use

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

WebStorm Mac version
Useful JavaScript development tools

EditPlus Chinese cracked version
Small size, syntax highlighting, does not support code prompt function






