Detailed graphic and text explanation of pseudo-static URL in PHP

黄舟
Release: 2023-03-17 12:04:01
Original
1986 people have browsed it

我们之前给大家结果了php静态模式的开始,什么是伪静态以及php伪静态的使用意义,相信大家对php伪静态有了详细了解,那么今天我们给打大家介绍下,php实现网址伪静态的详解!

效果图
工程目录
Detailed graphic and text explanation of pseudo-static URL in PHP

访问地址Detailed graphic and text explanation of pseudo-static URL in PHP

Detailed graphic and text explanation of pseudo-static URL in PHP

Detailed graphic and text explanation of pseudo-static URL in PHP

具体操作步骤
1.找到 httpd.conf 文件,再找到“LoadModule rewrite_module”,将前面的”#”号删除即表示取用该功能。
2.  找到http.config  替换所有的AllowOverride None  为AllowOverride All
3. 在网站更目录下 新建   .htaccess  文件 内容为如下
4

<IFMODULE mod_rewrite.c> 

    RewriteEngine On 

    RewriteBase / 

    RewriteRule (.*)\.html$ $1\.php [QSA,PT,L] 

    </IFMODULE>
Copy after login


4.重启apache

总结:

本文通过图文的形式为大家介绍了关于php实现网址伪静态的案例,更为直观的帮助大家的了解,希望对你有所帮助!

相关推荐:

php伪静态模式的开启


伪静态是什么?php使用伪静态的意义?

PHP伪静态的图文代码详细介绍

什么是伪静态?三种实现PHP伪静态的方法介绍

The above is the detailed content of Detailed graphic and text explanation of pseudo-static URL in PHP. For more information, please follow other related articles on the PHP Chinese website!

source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template