Home > Backend Development > PHP Tutorial > nginx下配置url重写!解决思路

nginx下配置url重写!解决思路

WBOY
Release: 2016-06-13 13:35:27
Original
849 people have browsed it

nginx下配置url重写!
hostname/infor/index.php?q=ssq
hostname/ssq_index.html
我想把上面的url重写成下面的形式,谢谢大家!

------解决方案--------------------

RewriteEngine On
RewriteBase /
RewriteRule ^([0-9_a-z]+)_index.html$ infor/index.php?q=$1 [L,R=301]


仅供参考
------解决方案--------------------
RewriteEngine On
RewriteRule ^(.*)_index.html$ /infor/index.php?q=$1 [L]

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