Home > Backend Development > PHP Tutorial > 如何动态页面转成伪静态

如何动态页面转成伪静态

WBOY
Release: 2016-06-06 20:22:10
Original
1335 people have browsed it

如何将动态页面转成伪静态

回复内容:

如何将动态页面转成伪静态

rewrite

举例webserver为nginx
eg:

<code>//规则
rewrite ^(.*)/index-([0-9]+)-([0-9]+).html$ $1/index.php?testid=$2&page=$3 last;</code>
Copy after login

则效果如下

<code>http://xxx.com/test/index-1-1.html
//则rewrite后真正访问的是
http://xxx.com/test/index.php?testid=1&page=1</code>
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