htaccess将具有{{link}}的所有链接重定向到没有该字符串的相同链接

From some unknown reason, Google has indexed many pages on my website with a weird {{link}} as part of the url. Most of the times it is a copy of the same page without that weird string, but this duplicated content is concerning.

How can I redirect all urls that include the string "{{link}}" to the same url, just without the {{link}} ?

Try this .htaccess:

Options +FollowSymLinks
RewriteEngine on
RewriteRule ^(.*)/\{\{link\}\}\_(.*)$ /$1/$2 [R=301,L]