【问题标题】:410 generated url with parameters410生成的带参数的url
【发布时间】:2021-01-21 00:44:02
【问题描述】:

我有类似这样的 url 模式列表

https://www.web.com/?route=affiliate/register&amp
https://www.web.com/?route=account/edit&amp
https://www.web.com/index.php?route=affiliate/register&amp
https://www.web.com/index.php?route=account/edit&amp
https://www.web.com/?route=product/manufacturer/productmanufacturer_id
https://www.web.com/index.php?route=product/manufacturer/productmanufacturer_id

index.php 之后的任何 url 变化都不再被使用

我想请求一些帮助以正确地设置任何东西 index.php 为 410,因为 index.php 仍在使用几个页面

---编辑---

我的默认索引页面使用默认(index.php,index.html,index.htm

所以使用 ravi htaccess 代码这个 url 仍然返回 200 OK(不起作用)

https://www.web.com/?route=affiliate/register&amp
https://www.web.com/?route=account/edit&amp

并且仅适用于此网址变体

https://www.web.com/index.php?route=affiliate/register&amp
https://www.web.com/index.php?route=account/edit&amp

【问题讨论】:

    标签: .htaccess mod-rewrite url-rewriting query-string http-status-code-401


    【解决方案1】:

    您能否尝试以下,按照所示示例编写。请在测试您的 URL 之前清除您的浏览器缓存。

    RewriteEngine ON
    RewriteCond %{QUERY_STRING} ^route [NC]
    RewriteRule ^ - [R=410,L]
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2014-11-13
      • 2013-12-01
      • 1970-01-01
      • 2018-11-05
      • 1970-01-01
      • 2011-05-14
      相关资源
      最近更新 更多