如何410有毒的Prestashop URL模式?

发布于 2025-01-26 08:26:48 字数 339 浏览 3 评论 0原文

我一直在尝试410个模式的数千种有毒网址,这些模式是Google为我的一个客户索引的。我希望包含?%的网站的每个URL发送410响应代码,以便它们被删除。

URL的示例:

https://www.example.com/fr/promotions?%25252525253Bid_lang=6&p=6

我试图将其放在.htaccess上,如我在此处的另一个线程上所发现的,但是它不起作用,有什么想法吗?

RewriteRule ^[a-z]shop($|/) - [G]

I've been trying to 410 a pattern of a few thousands toxics URLS that got indexed by Google for one of my clients. I want every urls of the website that contain ?% to send a 410 response code so they got de-indexed.

Example of an URL :

https://www.example.com/fr/promotions?%25252525253Bid_lang=6&p=6

I've tried to put this in the .htaccess, above the If module section, as I found on another thread here, but it didn't work, any ideas ?

RewriteRule ^[a-z]shop($|/) - [G]

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

凤舞天涯 2025-02-02 08:26:48

我希望包含?%的网站的每个URL发送410响应代码

我希望包含?%的网站的每个URL使用MOD_REWRITE在.htaccess文件的顶部

# Send 410 for any URL where the query string starts with "%"
RewriteCond %{QUERY_STRING} ^%
RewriteRule ^ - [G]

I want every urls of the website that contain ?% to send a 410 response code

Using mod_rewrite at the top of the .htaccess file:

# Send 410 for any URL where the query string starts with "%"
RewriteCond %{QUERY_STRING} ^%
RewriteRule ^ - [G]
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文