从网上搜索到的规则,但不能用,修改了一下, 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; [...]