forsee 发表于 2010-3-27 20:42:13

分享:Nginx下的伪静态规则

rewrite ^/(.*)-htm-(.*)$ /$1.php?$2;
rewrite ^/(.*)/show-(+)([\-])?(+)?\.html$ /$1/show.php?itemid=$2&page=$4;
rewrite ^/(.*)/list-(+)([\-])?(+)?\.html$ /$1/list.php?catid=$2&page=$4;
rewrite ^/(.*)/show/(+)/(+)?([/])?$ /$1/show.php?itemid=$2&page=$3;
rewrite ^/(.*)/list/(+)/(+)?([/])?$ /$1/list.php?catid=$2&page=$3;
rewrite ^/(+)\.co/(.*)$ /company/index.php?homepage=$1&rewrite=$2;
rewrite ^/(htm)/(.*)$ /index.php?&rewrite=$2;

[ 本帖最后由 forsee 于 2010-3-27 21:11 编辑 ]

atbaidu 发表于 2011-5-25 15:48:39


测试一下好不好用?
http://bbs.destoon.com/static/image/smiley/default/victory.gif
页: [1]
查看完整版本: 分享:Nginx下的伪静态规则