从Wordpress中的帖子中删除/feed
我又有一个关于重定向的小问题。
我的wordpress博客是相当新的,我真的很喜欢它,但我发现在谷歌和其他‘搜索引擎优化’工具中,出于某种原因,我的https://www.domain.tld/posting-name/feed网址被读出。以前从来没见过。现在我希望重定向所有这种类型的提要urls。
https://www.domain.tld/posting-1-name/feed重定向至https://www.domain.tld/posting-1-name/ https://www.domain.tld/posting-2-name/feed重定向至https://www.domain.tld/posting-2-name/ https://www.domain.tld/posting-3-name/feed重定向至https://www.domain.tld/posting-3-name/
我该怎么做呢?
手工做这件事是小菜一碟
Redirect 301 /posting-1-name/feed https://www.domain.tld/posting-1-name/
Redirect 301 /posting-2-name/feed https://www.domain.tld/posting-2-name/
Redirect 301 /posting-3-name/feed https://www.domain.tld/posting-3-name/
但由于这是一个博客,每周至少会有4-8个新帖子,我不能简单地在每次创建新帖子时添加所需的行。
mod_rewrite中一定有什么东西,或者它是如何调用的,不是吗?
请说"Sure $&!&,只需使用这行代码。如果你知道如何调用这种重定向,你可以在谷歌搜索1分钟内找到它“。但我不知道该怎么叫它...什么也找不到..functions.php的代码片段只用于删除代码页眉/页脚中提要的链接。
谢谢你们。
转载请注明出处:http://www.chufzs.com/article/20230526/1804193.html