Jump to content

[SOLVED] how to redirect product's page to category's page


mma87

Recommended Posts

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

  • 2 weeks later...
  • 2 weeks later...

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

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

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

  • 1 year later...

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

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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...