[英]Remove subdirectory and redirect 301
I use Wordpress, WooCommerce and MailChimp plugin, I think there's issue about MailChimp plugin. 我使用Wordpress,WooCommerce和MailChimp插件,我认为MailChimp插件存在问题。
I found on Search Console a lot of 404 error, links like this: 我在Search Console上发现了很多404错误,链接如下:
/product-name/15df4gdfg4d5g4d56f /产品名称/ 15df4gdfg4d5g4d56f
How can remove: 15df4gdfg4d5g4d56f 如何删除:15df4gdfg4d5g4d56f
and write redirect on: /product-name/ ? 并在/ product-name /上写重定向
I think I need a rule because there are a lot 404 error 我认为我需要一条规则,因为有很多404错误
Thanks in advance 提前致谢
The simplest solution is to would use the Redirection plugin. 最简单的解决方案是使用重定向插件。 It allows you to create Regex rules so that anything that matches
/product-name/*
redirects to /product-name/
. 它允许您创建正则表达式规则,以便与
/product-name/*
匹配的任何内容都重定向到/product-name/
。 Otherwise, you'd have to manually write rules to your .htaccess
file. 否则,您将必须手动将规则写入
.htaccess
文件。
The Redirection plugin also catches any 404s and allows you to create redirection rules based on those 404 errors. 重定向插件还可以捕获所有404,并允许您基于这些404错误创建重定向规则。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.