I wish to redirect /trolley.php?whatever to /flow.php (I do not worry about parameters after trolley.php), and so i authored this rule:

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

however it redirect to /flow.php?whatever

Try:


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