【问题标题】:Trying to Redirect 301 %E2%80%A6 in htaccess file尝试在 htaccess 文件中重定向 301 %E2%80%A6
【发布时间】:2013-04-24 04:12:25
【问题描述】:

我的 Google 网站管理员工具中有一个来自大型网站的链接,该网站错误地发布了我的链接。经过多次尝试让他们更改它,我将 301 链接到正确的页面,因为我想要那个链接。问题是在我的 GWT 中,链接显示为

http://www.otherdomain.com/%E2%80%A6crabble-word-finder

如果你把鼠标放在链接上,它看起来像

http://www.otherdomain.com/...crabble-word-finder

我尝试了我的 htaccess 文件,但没有成功

Redirect 301 /...crabble-word-finder http://www.mydomain.com/scrabble-word-finder/

Redirect 301 /%E2%80%A6crabble-word-finder http://www.mydomain.com/scrabble-word-finder/

知道如何让这个重定向起作用吗?

【问题讨论】:

    标签: html .htaccess redirect


    【解决方案1】:

    如果你只是想将 /%E2%80%A6crabble-word-finder 重定向到 /scrabble-word-finder/ 那么你可以简单地试试这个 .htaccess 代码:

    RewriteEngine on
    RewriteRule ^%E2%80%A6crabble-word-finder/?$ /scrabble-word-finder/ [R]
    

    刚刚通过此链接考虑了[R=301] 标志:https://stackoverflow.com/a/15999177/2007055

    【讨论】:

      【解决方案2】:

      一些黑客试图使用此类重定向来利用网站。

      如果他们成功重定向,那么他们会尝试通过表单注入看似无害的内部链接,以便将流量重定向到他们的网站和/或获得链接汁 a-la 页面排名。

      【讨论】:

        【解决方案3】:

        尝试使用引号:

        Redirect 301 "/...crabble-word-finder" http://www.mydomain.com/scrabble-word-finder/
        

        【讨论】:

          猜你喜欢
          • 1970-01-01
          • 1970-01-01
          • 2015-05-19
          • 1970-01-01
          • 2023-03-21
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多