shilang 发表于 2016-12-26 10:26:44

Nginx实现伪静态页面

  1、虚拟页面
  /entries/mb_1_2_3.htm
  2、真实地址
  /entries?class=1&mod=2&action=3
  3、重写规则
  rewrite "(.*)/mb_(+)_(*)?(+)?.htm$" $1?class=$2&mod=$3&action=$4? last;
  这样可以一定程度上防止url伪造攻击。
页: [1]
查看完整版本: Nginx实现伪静态页面