• 请不要在回答技术问题时复制粘贴 AI 生成的内容
sleepm
V2EX  ›  程序员

已经被利用,但没修复的,不算 bug 的 bug

  •  
  •   sleepm ·
    sleepm · Sep 29, 2023 · 3178 views
    This topic created in 969 days ago, the information mentioned may be changed or developed.

    在开发者论坛发过贴,被删了 几个月了,也没改,那就说道说道

    在 wordpress 搜索,如果对应关键词搜不到任何文章或者页面,还是会有一个 http 状态码 200 的页面,以及链接

    比如

    example.com/?q=减肥瘦身 WX@abc
    

    200 也就意味着这个网页存在,可以提交到搜索引擎索引,这样搜索某些关键词的时候,大概率会看到好多类似的页面

    谷歌已经删除了大部分这种的页面,不过还是有其他,比如用户注册登录,新建 tag ,新建分类 https://mjj.today/i/sNiT0p

    临时解决办法是,没有搜索结果的页面返回 404

    在文件中搜索 is_search() || 然后删除

    /wp-includes/class-wp.php

    4 replies    2023-09-29 23:22:04 +08:00
    Yourshell
        1
    Yourshell  
       Sep 29, 2023   ❤️ 1
    你这个应该是 Canonical URL 的问题
    tutudou
        2
    tutudou  
       Sep 29, 2023
    这不是以前的黑帽 seo 吗,提升外链吸引爬虫用的。
    sleepm
        3
    sleepm  
    OP
       Sep 29, 2023
    @tutudou 以前只见过 http 劫持,入侵挂脚本跳转,这种没见过
    kingfalse
        4
    kingfalse  
       Sep 29, 2023 via Android
    这不就内容农场的套路
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   939 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 39ms · UTC 21:00 · PVG 05:00 · LAX 14:00 · JFK 17:00
    ♥ Do have faith in what you're doing.