Home > Backend Development > PHP Tutorial > Nginx伪静态写法有关问题

Nginx伪静态写法有关问题

WBOY
Release: 2016-06-13 12:13:46
Original
905 people have browsed it

Nginx伪静态写法问题
目标:将 zonggang.php?shuhao=130重写成  read/130
以前用的win服务器,使用appserv ,这样写就ok:
RewriteRule ^/?read/([0-9]+) zonggang.php?shuhao=$1

现在换了liunx ,用的nginx服务器在网上找了转化写法

 rewrite ^/?read/([0-9]+)$zonggang.php?shuhao=$1 last ;

结果提示404错误,请教大家,我的写法是不是有问题

------解决思路----------------------
重写成  read/130 就需要启用 path_info 模式,你做到了没有?

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