没有参数的RewriteRule

时间:2011-12-30 06:07:45

标签: apache mod-rewrite redirect

我想将/cart.php重定向到/flow.php(我不关心cart.php之后的参数),所以我写了这条规则:

RewriteRule ^cart.php flow.php$ [R=301,L]

但它重定向到/flow.php?whatever

1 个答案:

答案 0 :(得分:2)

尝试:

RewriteRule ^cart.php flow.php? [R=301,L]