I have a dynamic page that I need to redirect to another dynamic page in .htaccess.
I have tried different syntax for the redirect but nothing seems to work:
RewriteEngine on
RewriteRule /index.php?p=page&page_id=store$ http://www.website.com/index.php [R=301]
OR
RewriteEngine on
RewriteCond %{QUERY_STRING} ^p=page&page_id=store$
RewriteRule ^/index.php$ http://www.website.com/index.php? [L,R=301]
EDIT: I have an old php page in the shopping cart that I have transferred to the new address. So in order to preserve search engine page ranking I want to redirect old page to the new address. I want visitors who still visit www.website.com/index.php?p=page&page_id=store to be redirected to website.com/index.php
Thanks in advance!