mma87 Posted January 14, 2014 Share Posted January 14, 2014 Hi, I have to redirect one specific product's page to one specific category's page, I'm using ps 1.4.7 I try to use .htaccess but It doesn't work, the code that I used is: RewriteRule ^(300-cat-offline-4)$ http://www.italia-mobili.it/7-sedie [R=301,L] then redirectMatch 301 ^(300-cat-offline-4)$ http://www.italia-mobili.it/7-sedie can someone help me? thanks and regards, Matteo Link to comment Share on other sites More sharing options...
mma87 Posted January 27, 2014 Author Share Posted January 27, 2014 I answer by myself: the correct code is RewriteRule ^(.*)1012-sedie-pelle-round\.html$ http://www.italia-mobili.it/7-sedie/$1 [R=301,L,NC] I put this code in the line after RewriteEngine on and using this code I redirect one protuct to one category I hope this code is useful for the community Matteo 1 Link to comment Share on other sites More sharing options...
vekia Posted January 28, 2014 Share Posted January 28, 2014 hello thank you for posting solution, may i know how the link looks like after redirection? Link to comment Share on other sites More sharing options...
mma87 Posted January 28, 2014 Author Share Posted January 28, 2014 yes, off course! the link, after redirection is http://www.italia-mobili.it/7-sedie N.B. the code that I send is a sample, I do the redirect in one other link Link to comment Share on other sites More sharing options...
vekia Posted January 28, 2014 Share Posted January 28, 2014 thank you for clarification im going to mark whole topic as [solved] im more than convinced that this short .htaccess code will be helpful for other merchants here with regards, Milos Link to comment Share on other sites More sharing options...
mma87 Posted January 28, 2014 Author Share Posted January 28, 2014 you're welcome! thanks for mark whole topic as [solved] Matteo Link to comment Share on other sites More sharing options...
nathanielleee Posted February 12, 2014 Share Posted February 12, 2014 i am looking to redirect a product page simply to include the category in the link. For example: www.ApostolicClothing.com/iris.html should be www.ApostolicClothing.com/skirts/iris.html Hope that makes sense. I know how to change the SEO to include the category but due to our social media presence, i dont want all of our outside links to go bad. ANY HELP WOULD BE APPRECIATED. Link to comment Share on other sites More sharing options...
mma87 Posted February 12, 2014 Author Share Posted February 12, 2014 Hi, if iris is a product, you need to change the primary category in the product's page in the backoffice. first of all you have to create the category "skirts" (if there isn't yet) after go to BO search the product, modify it, assign it to skirts category and then choose in the default category dropdown "skirts" now the new url is changed. Matteo Link to comment Share on other sites More sharing options...
nathanielleee Posted February 12, 2014 Share Posted February 12, 2014 Hi, if iris is a product, you need to change the primary category in the product's page in the backoffice. first of all you have to create the category "skirts" (if there isn't yet) after go to BO search the product, modify it, assign it to skirts category and then choose in the default category dropdown "skirts" now the new url is changed. Matteo Thats not the issue. Iris is already in the category skirts but it still doesnt show in the link. so i figured out how to add the category to the ink but still not how to redirect the old link to the new one Link to comment Share on other sites More sharing options...
mma87 Posted February 12, 2014 Author Share Posted February 12, 2014 can you send the exact links? Link to comment Share on other sites More sharing options...
Housy Posted September 22, 2015 Share Posted September 22, 2015 Hello mma87 Do you maybe know, how should the redirect code look like, if i want to redirect specific category/subcategory to a product within that category/subcategory? I need this, because i have a subcategory with one product only, so it would be very handy solution.Thank you and best regards, Housy I answer by myself: the correct code is RewriteRule ^(.*)1012-sedie-pelle-round\.html$ http://www.italia-mobili.it/7-sedie/$1 [R=301,L,NC] I put this code in the line after RewriteEngine on and using this code I redirect one protuct to one category I hope this code is useful for the community Matteo Link to comment Share on other sites More sharing options...
mma87 Posted September 23, 2015 Author Share Posted September 23, 2015 Hello Housy, you can try to use this code in htaccess: Redirect 301 /old-product-link.html http://www.yoursite.com/1-category /* example */ Redirect 301 /complementi-d-arredo/66-pouf-tondo-pt60.html http://www.italia-mobili.it/26-complementi-d-arredo let me know if it works for you! Matteo Hello mma87 Do you maybe know, how should the redirect code look like, if i want to redirect specific category/subcategory to a product within that category/subcategory? I need this, because i have a subcategory with one product only, so it would be very handy solution.Thank you and best regards, Housy Link to comment Share on other sites More sharing options...
mma87 Posted September 23, 2015 Author Share Posted September 23, 2015 this solution works for all links type. the syntax is: Redirect 301 old-link new-link Matteo 1 Link to comment Share on other sites More sharing options...
Housy Posted September 23, 2015 Share Posted September 23, 2015 Tried on my test shop and it works well, thanks this solution works for all links type. the syntax is: Redirect 301 old-link new-link Matteo Link to comment Share on other sites More sharing options...
mma87 Posted September 23, 2015 Author Share Posted September 23, 2015 well done! Tried on my test shop and it works well, thanks 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