Lisafer Posted November 2, 2015 Share Posted November 2, 2015 I'm VERY new to php and it's been a wild three weeks. I'm moving my old Miva shopping cart to Opencart - I have it up and working. I still have a lot to learn but it seems to be functioning. I'm having trouble with my htaccess redirect rules. This is what I've got for now: RewriteCond %{QUERY_STRING} ^Screen=PROD&Store_Code=SI&Product_Code(.*)$RewriteRule ^(.*)$ http://www.domain.com/catalog/ [R=301,L] RewriteCond %{QUERY_STRING} ^Screen=PROD&Product_Code=(.*)$RewriteRule ^(.*)$ http://www.domain/catalog/ [R=301,L] RewriteCond %{QUERY_STRING} ^Screen=CTGY&Category_Code=(.*)$RewriteRule ^(.*)$ http://www.domain.com/catalog/ [R=301,L] And that's redirecting to the front page of the shopping cart. The "old" product code is now the "model number" in the new cart. I looked in the tpl files and it looks like I want to put the identifier? varible? of <?php echo $product['model']; ?> into the rewrite rule - this will redirect all 1100 products in the old cart into the correct page in my new cart. But I don't know how to turn <?php echo $product['name']; ?> into something that will work. I also used to have dynamic links and now have static. I need a drink. Please please help. Please. Quote Link to comment https://forums.phpfreaks.com/topic/299016-please-help/ Share on other sites More sharing options...
QuickOldCar Posted November 3, 2015 Share Posted November 3, 2015 You should look into a migration service to go from miva to opencart. cart2cart Not sure what are asking for in php, php isn't used in htaccess file, need to change some items in the script itself? As for htaccess rules, you can return the values of the parameters back as a variable back something like this RewriteRule /catalog/Screen/(.*)/Store_Code/(.*)/Product_Code/(.*) ?Screen=$1&Store_Code=$2&Product_Code=$3 [QSA] Quote Link to comment https://forums.phpfreaks.com/topic/299016-please-help/#findComment-1525272 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.