如何简单地使用这个nginx重写规则

时间:2014-10-23 15:12:53

标签: nginx

如何简化这个nginx重写规则? 已经尝试了很多规则,但它不起作用。

rewrite ^/past-look-no-(.*)\.htm$ /index.php?do=past&values=$1&submit=SEARCH&looka=1&cont=Y last;
rewrite ^/past-snipe-no-(.*)\.htm$ /index.php?do=past&values=$1&submit=SEARCH&sniper=1&cont=Y last;
rewrite ^/past-kiss-no-(.*)\.htm$ /index.php?do=past&values=$1&submit=SEARCH&kisses=1&cont=Y last;
rewrite ^/past-kill-no-(.*)\.htm$ /index.php?do=past&values=$1&submit=SEARCH&killed=1&cont=Y last;
rewrite ^/past-jump-no-(.*)\.htm$ /index.php?do=past&values=$1&submit=SEARCH&jumper=1&cont=Y last;
rewrite ^/past-cash-no-(.*)\.htm$ /index.php?do=past&values=$1&submit=SEARCH&casher=1&cont=Y last;
rewrite ^/past-rob-no-(.*)\.htm$ /index.php?do=past&values=$1&submit=SEARCH&robs=1&cont=Y last;

问候

0 个答案:

没有答案