Home  >  Article  >  Backend Development  >  Example of how to write nginx pseudo-static rewrite rules

Example of how to write nginx pseudo-static rewrite rules

WBOY
WBOYOriginal
2016-07-29 09:13:581129browse

件 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.

Statement:
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