gpt4 book ai didi

url - 查询字符串前的尾部斜杠。不好的做法?

转载 作者:行者123 更新时间:2023-12-04 00:54:17 25 4
gpt4 key购买 nike

我有一个类似 www.example.com/store/ 的 URL ,这会导致一个商店页面

当用户点击折扣链接时,它会添加参数 ?discount=foo ,所以我的链接是这样的:www.example.com/store/?discount=foo .

一切都是功能性的。但是在这种情况下在查询字符串之前使用正斜杠是不好的做法吗?

最佳答案

有效:

  • path component可能以斜杠结尾 ( / )。
  • query component以 URI 中的第一个问号 ( ? ) 开头。
  • 关于url - 查询字符串前的尾部斜杠。不好的做法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/29855027/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com