【问题标题】:Fake URLs created automaticly自动创建的虚假 URL
【发布时间】:2013-11-03 00:29:49
【问题描述】:

在查看我在 Google 和 Bing 中的索引页面时。我在搜索引擎索引列表中找到了以下链接。我在谷歌网站管理员工具中收到 404 错误。我只安装了wordpress。我没有任何插件或任何其他 CMS (Joomla) 可以创建这些链接。 我应该如何删除额外的字符串/值? .htaccess 的代码是什么

请忽略 url 和字符串/值之间的 2 个空格。

deemasfashion.com/page/5/ ?Itemid=fnexvhxovxlxhzjb

deemasfashion.com/page/2/ ?start=117

deemasfashion.com/page/44/ ?wpmp_switcher=mobile

deemasfashion.com/page/56/?attachment_id=fqtldnsdj

deemasfashion.com/page/56/ ?attachment_id=pffbvrpggpx

deemasfashion.com/page/13/ ?attachment_id=riohhjoahp

deemasfashion.com/page/51/ ?start=108

deemasfashion.com/ ?iapolo_com

deemasfashion.com/ ?Itemid=nkuilfzcxvvb

deemasfashion.com/?wpmp_switcher=desktop

deemasfashion.com/page/38/ wpmp_switcher

deemasfashion.com/page/7/ ?wpmp_switcher=desktop=mobile

deemasfashion.com/page/7/ ?wpmp_switcher=desktop

deemasfashion.com/page/39/?2fou_com

deemasfashion.com/page/22/?file

deemasfashion.com/page/56/ ?option=com_content&view=article&id=94&Itemid=2

deemasfashion.com/page/36/ ?option=com_content&view=article&id=62&Itemid=2

deemasfashion.com/page/21/ ?iframe=true&width=90%25&height=90%25

deemasfashion.com/ ?option=com_content&view=category&id=34%3Alatest-tech-news&Itemid=60

deemasfashion.com/latest-pakistani-anarkali-pishwas-frock-wear/indian-style-light-golden-anarkali-fashion/ function.session-start

deemasfashion.com/latest-pakistani-anarkali-pishwas-frock-wear/latest-pakistani-outfit-mehndi-green-pishwas-churidar/ function.require

deemasfashion.com/latest-pakistani-bridal-wear/red-front-open-gown-off-white-bridal-wear-lehnga/ function.include

我使用了下面的 .htaccess 代码,但它不起作用。

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^(page/[0-9]+/).+$ /$1? [L,NC,R=301]
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteCond %{HTTP_HOST} ^www\.deemasfashion\.com$
RewriteRule ^deemasfashion\.com/?(.*)$ http://deemasfashion.com/$1 [R=301,L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.html\ HTTP/
</IfModule>

【问题讨论】:

    标签: wordpress .htaccess redirect http-status-code-404


    【解决方案1】:

    您的大部分错误 URL 可以通过此规则永久重定向到更正一个:

    RewriteEngine On
    
    RewriteCond %{QUERY_STRING} ^.+$
    RewriteRule ^(page/[0-9]+/).*$ /$1? [L,NC,R=301]
    

    【讨论】:

    • 您能否通过编辑您的问题来发布此代码。无法从 cmets 中读取。
    • 你是如何测试它的?
    • 我已经在 htaccess 文件中添加了这个,然后测试了假网址
    • 您是否通过尝试在浏览器中加载 URL 或其他测试方法进行测试。
    • 是的,我在浏览器中尝试了不同的假 URL。但他们不重定向,我已经尝试在 GWT “fetch as google”它仍然给出错误 404
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-10-15
    • 2014-05-17
    • 2016-09-29
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多