本文介绍了htaccess的重写规则后,RK = 0 / RS =删除一切的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个网站,是获得了很多的要求为不存在的网页。

I have a website that is getting a lot of requests for pages that don't exist.

所有的请求都基于已有的页面上,但 RK = 0 / RS = 加在后面加上一个随机字符串。

All the requests are based on an existing page, but have RK=0/RS= plus a random string of characters at the end.

例如,请求是:

www.domain.com/folder/article/RK=0/RS=M9j32OWsFAC_u8I6a0xOMjYKU_Q-

但页面 www.domain.com/folder/article 确实存在。

我想用的htaccess 说:

如果 RK = 0 / RS = 存在,在

但一直没能得到它的工作。

but haven't been able to get it working.

所有的htaccess 规则谈论删除的查询字符串,但我猜,因为这没有一个这不是一个查询。

All the htaccess rules talking about removing query strings, but I'm guessing because this doesn't have a ? it's not a query.

有人能帮助我了解如何做到这一点?

Could someone help me understand how to do this?

推荐答案

您可以在根.htaccess文件中使用此规则:

You can use this rule in root .htaccess file:

RewriteEngine On

RewriteRule ^(folder/article/)RK=0/RS= /$1 [L,NC,R=301]

这篇关于htaccess的重写规则后,RK = 0 / RS =删除一切的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

11-02 22:23