Results 1 to 2 of 2
Thread: 301 redirect dynamic to dynamic
-
01-20-2009, 06:42 PM #1Newbie
- Join Date
- Mar 2009
- Posts
- 6
I searched the forums and found what I think are the answers I need but I wanted to make sure I am not way off base before I edited the htaccess file.
I am migrating from oscommerce to zencart and I need to redirect existing dynamic links from
http://mystore.com/product_info.php?cPath=41&products_id=810
to
http://mystore.com/shop/index.php?main_page=product_info&cPath=41&products_id=810
Here is the code that I hope should work.
<code>
RewriteEngine on
RewriteCond %{QUERY_STRING} ^id=(.*)$
RewriteRule ^product_info.php?$ http://mystore.com/shop/index.php?main_page=product_info&$1 [R=301, L]
</code>
-
01-20-2009, 09:43 PM #2Newbie
- Join Date
- Jul 2007
- Location
- United States
- Posts
- 20
No need for a condition. Something like this should work:
RewriteRule ^product_info.php?cPath=([0-9]+)&products_id=([0-9]+)$ http://mystore.com/shop/index.php?main_page=product_info&cPath=$1&products_id=$2 [R=301,L]