admin管理员组

文章数量:1122846

my product structure was like the following before:

/

Now, I've done some updates to the translations and this is how the product urls appear now:

/

(without the 'o' in product)

It's actually OK to me, but on my shop page the URLs kept the final 'o', redirecting to 404 my products. How can I fix this?

my product structure was like the following before:

https://example.com/producto/product-name/

Now, I've done some updates to the translations and this is how the product urls appear now:

https://example.com/product/product-name/

(without the 'o' in product)

It's actually OK to me, but on my shop page the URLs kept the final 'o', redirecting to 404 my products. How can I fix this?

Share Improve this question asked Dec 8, 2016 at 16:29 fabiofabio 112 bronze badges
Add a comment  | 

1 Answer 1

Reset to default 0

the easiest and best way to do that is to edit your .htaccess file.

Your .htaccess file is located in your FTP under the folder public_html (usually).

This way, when a user is trying to access your old url /producto/ it will immediately change to /product/ as a 301 permanent redirect.

In that file, you will see these lines-

RewriteEngine On
RewriteBase /

After those line, try adding this line-

RewriteRule ^producto/(.*) product/$1 [R=301,L]

I didn't test this code but i believe it should do the trick

本文标签: WooCommerce product permalink changed