Brian Posted June 28, 2019 Share Posted June 28, 2019 I edited the format of my product and category urls to remove the id. Category pages work fine but products return 404. I have removed duplicate urls, cleared cache, regenerated htaccess, tried with overrides and modules on and off and nothing worked. I have used the updater to check my installation. All the products I checked returned 404. Any ideas? Link to comment Share on other sites More sharing options...
Kashir2000 Posted June 28, 2019 Share Posted June 28, 2019 Not sure if TB supports "ID" to "NOID" redirect for products. Would need to dig into code and/or maybe someone who knows more may answer that. But I'm not writing here for your problem, but more as a warning: Read above and then decide if you really want to disable URLs 🙂 Link to comment Share on other sites More sharing options...
Factor Posted June 28, 2019 Share Posted June 28, 2019 (edited) Did you set that in SEO and Urls? http://nemops.com/customize-prestashop-urls/#.XRZgKpNKjUI Start around 4:41 If it has a * its required. This section enables you to change the default pattern of your links. In order to use this functionality, thirty bees' "Friendly URL" option must be enabled, and Apache's URL rewriting module (mod_rewrite) must be activated on your web server. There are several available keywords for each route listed below; note that keywords with * are required! To add a keyword in your URL, use the {keyword} syntax. If the keyword is not empty, you can add text before or after the keyword with syntax {prepend:keyword:append}. For example {-hey-:meta_title} will add "-hey-my-title" in the URL if the meta title is set. Edited June 28, 2019 by Factor Link to comment Share on other sites More sharing options...
Brian Posted June 28, 2019 Author Share Posted June 28, 2019 I edited the format of my product and category urls to remove the id. Category pages work fine but products return 404. I have removed duplicate urls, cleared cache, regenerated htaccess, tried with overrides and modules on and off and nothing worked. I have used the updater to check my installation. All the products I checked returned 404. Any ideas? Link to comment Share on other sites More sharing options...
Factor Posted June 28, 2019 Share Posted June 28, 2019 You have double posted. Your original question is here. @wakabayashi can we merge this? Link to comment Share on other sites More sharing options...
Brian Posted June 28, 2019 Author Share Posted June 28, 2019 Yeah, sorry about that. I thought I had posted it in the wrong place. That's why I reposted it. Link to comment Share on other sites More sharing options...
wakabayashi Posted June 28, 2019 Share Posted June 28, 2019 @Factor I have merged it! Link to comment Share on other sites More sharing options...
Brian Posted July 1, 2019 Author Share Posted July 1, 2019 So now that that's out of the way, does anybody have any ideas about how to solve my original problem? Link to comment Share on other sites More sharing options...
wakabayashi Posted July 1, 2019 Share Posted July 1, 2019 Which urls don't work? The new or the old ones? Or both? Link to comment Share on other sites More sharing options...
Brian Posted July 2, 2019 Author Share Posted July 2, 2019 The new product urls don't work. If I remove the id and the category I just get a 404. Link to comment Share on other sites More sharing options...
wakabayashi Posted July 2, 2019 Share Posted July 2, 2019 What is your url structure? Mine is: {categories:/}{rewrite} This works fine for me. Link to comment Share on other sites More sharing options...
Brian Posted July 2, 2019 Author Share Posted July 2, 2019 I tried {category:/}{reference}-{rewrite} and that returns 404. I also tried {reference}-{rewrite}but when I tried to save it returned the error: Route "product_rule" with rule: "{reference}-{rewrite}" needs a correct delimiter Link to comment Share on other sites More sharing options...
wakabayashi Posted July 2, 2019 Share Posted July 2, 2019 Can you try mine from above and see if it works? Link to comment Share on other sites More sharing options...
Brian Posted July 2, 2019 Author Share Posted July 2, 2019 I need the reference as many of my products have the same name but have unique references. Link to comment Share on other sites More sharing options...
Brian Posted July 2, 2019 Author Share Posted July 2, 2019 Although I guess I could include the reference in the rewrite. Link to comment Share on other sites More sharing options...
Brian Posted July 2, 2019 Author Share Posted July 2, 2019 I tried your structure with a product that has a unique name and it worked Link to comment Share on other sites More sharing options...
wakabayashi Posted July 2, 2019 Share Posted July 2, 2019 Please try this: {category:/}{reference}/{rewrite} I am not sure, but maybe this is the correct synthax. I guess the system has problem if you use "-" before {rewrite} Link to comment Share on other sites More sharing options...
Brian Posted July 2, 2019 Author Share Posted July 2, 2019 That worked! Thank you so much! Link to comment Share on other sites More sharing options...
Brian Posted July 3, 2019 Author Share Posted July 3, 2019 It's also worth noting that it seems that {category:/} is required for product urls. It would not work without it. The url structure I wanted was {reference}/{rewrite} but I had to use {category:/}{reference}/{rewrite} for it to work. 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