gigant09 Posted December 24, 2013 Share Posted December 24, 2013 Hi, I'm running Prestashop 1.5.3.1. My product URL look like that: www.shop.com/category-name/id-product.html Route to products: /category/{id}-{rewrite}.html I've imported all table manually to a new 1.5.6.1 installation. Now my URLs looking like: www.shop.com/id-product.html Route to products: {id}-{rewrite}.html I can't change route to products to: /category/{id}-{rewrite}.html If I do that, prestashop doesn't put the category-name there. My question now, google have indexed the old links, what could i do to avoid url problems?? Link to comment Share on other sites More sharing options...
Er.Ritesh Posted December 24, 2013 Share Posted December 24, 2013 Hi enjoy-vietnam are you use SEO & URLs (Friendly URL ) for shop. Link to comment Share on other sites More sharing options...
gigant09 Posted December 24, 2013 Author Share Posted December 24, 2013 (edited) yes, it's activated on both stores and also working. Just the problem, that the new store (1.5.6.1) is using different urls...without category name Edited December 24, 2013 by enjoy-vietnam (see edit history) Link to comment Share on other sites More sharing options...
Er.Ritesh Posted December 24, 2013 Share Posted December 24, 2013 ok then what formate you want to use for shop. Link to comment Share on other sites More sharing options...
gigant09 Posted December 24, 2013 Author Share Posted December 24, 2013 same like the old store: www.shop.com/category-name/id-product.html OR If possible the new format: www.shop.com/id-product.html but then i need to know how to redirect the old urls to the new format because actually I'm getting a 404 if I use the old url format on the new shop... Link to comment Share on other sites More sharing options...
Er.Ritesh Posted December 24, 2013 Share Posted December 24, 2013 ok, in that case i will suggest you please contact vekia. Link to comment Share on other sites More sharing options...
gigant09 Posted December 24, 2013 Author Share Posted December 24, 2013 (edited) I've found the solution. in classes/link.php changed: if ($dispatcher->hasKeyword('product_rule', $id_lang, 'category', $id_shop)) $params['category'] = (!is_null($product->category) && !empty($product->category)) ? Tools::str2url($product->category) : Tools::str2url($category); TO: if ($dispatcher->hasKeyword('product_rule', $id_lang, 'category')) $params['category'] = Tools::str2url($product->category); AND: Preferences SEO & URLs Route to products: {category}/{id}-{rewrite}.html for seo is it better to include the category names in the url? if I want to use the url without category name, what do i have to do to redirect the old urls? Thank you! Edited December 24, 2013 by enjoy-vietnam (see edit history) Link to comment Share on other sites More sharing options...
gigant09 Posted December 27, 2013 Author Share Posted December 27, 2013 still not solved, if i change like that I'm not able to use www.shop.com/id-product.html could someone look into this case please? Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now