nginx echsop rewrite规则

从网上搜索到的规则,但不能用,修改了一下,

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
rewrite ^/index.html$ /index.php;
		rewrite ^/category$ /index.php;
		rewrite ^/feed-c([0-9]+).xml$ /feed.php?cat=$1;
		rewrite ^/feed-b([0-9]+).xml$ /feed.php?brand=$1;
		rewrite ^/feed.xml$ /feed.php;
		rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$  /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8;
		rewrite ^/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*).html$ /category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5;
		rewrite ^/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$ /category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5;
		rewrite ^/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*).html$ /category.php?id=$1&brand=$2&page=$3;
		rewrite ^/category-([0-9]+)-b([0-9]+)(.*).html$  /category.php?id=$1&brand=$2;
		rewrite ^/category-([0-9]+)(.*).html$ /category.php?id=$1;
		rewrite ^/goods-([0-9]+)(.*).html$  /goods.php?id=$1;
		rewrite ^/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$  /article_cat.php?id=$1&page=$2&sort=$3&order=$4;
		rewrite ^/article_cat-([0-9]+)-([0-9]+)(.*).html$ /article_cat.php?id=$1&page=$2;
		rewrite ^/article_cat-([0-9]+)(.*).html$ /article_cat.php?id=$1;
		rewrite ^/article-([0-9]+)(.*).html$ /article.php?id=$1;
		rewrite ^/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+).html /brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5;
		rewrite ^/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*).html /brand.php?id=$1&cat=$2&page=$3;
		rewrite ^/brand-([0-9]+)-c([0-9]+)(.*).html /brand.php?id=$1&cat=$2;
		rewrite ^/brand-([0-9]+)(.*).html /brand.php?id=$1;
		rewrite ^/tag-(.*).html /search.php?keywords=$1;
		rewrite ^/snatch-([0-9]+).html$ /snatch.php?id=$1;
		rewrite ^/group_buy-([0-9]+).html$ /group_buy.php?act=view&id=$1;
		rewrite ^/auction-([0-9]+).html$ /auction.php?act=view&id=$1;

nginx 0.7x
ecshop v2.5.0 RELEASE 20071128

发表评论

电子邮件地址不会被公开。 必填项已用*标注