如何实现伪静态

WBOY
Release: 2016-06-23 13:25:50
Original
909 people have browsed it

如何在php程序中把http://www.kaimen360.com/exquisite.php?mod=show&id=512实现伪静态?


回复讨论(解决方案)

Server: Apache
X-Powered-By: PHP/5.3.27

在 Apache 中启用 url rewrite 功能

具体怎么 ,要看你的规则了

可以使用apache rewrite来实现。
具体要看你的规则是怎样的。

例如:
http://www.kaimen360.com/exquisite.php?mod=show&id=512
想显示为
http://www.kaimen360.com/exquisite_512.html

可以在根目录中创建一个.htaccess文件
内容如下:

<IfModule mod_rewrite.c>RewriteEngine onRewriteRule 'exquisite_(.*)\.html' exquisite.php?mod=show&id=$1 [NC]</IfModule>
Copy after login

Related labels:
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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!