Example of how to write nginx pseudo-static rewrite rules

WBOY
Release: 2016-07-29 09:13:58
Original
1125 people have browsed it

件 www.huobo.cc.conf

in the website configuration file .....

server_name www.huobo.cc;

index index.html index.htm index.php;
root/home/wwwroot/huobo;
......
Add
include huobo.cc.conf;

below the root line:

location / {

                                                                                                                                                   0-9]+)/vod-([0-9]+)-([0-9]+).html$ /video/index.php?$1-$2-$3.html last;
         }

This The rule is to rewrite http://www.huobo.cc/xiju/13239/vod-0-0.html to index.php in the /video folder in the root directory and bring the parameters

The above introduces examples of how to write nginx pseudo-static rewrite rules, including include content. I hope it will be helpful to friends who are interested in PHP tutorials.

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!