查询字符串前的斜杠.不好的做法? [英] Trailing slash before a query string. Bad practice?
本文介绍了查询字符串前的斜杠.不好的做法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个类似www.example.com/store/
的URL,该URL指向商店页面
I have a URL like www.example.com/store/
, which leads to a store page
当用户单击折扣链接时,它会添加参数?discount=foo
,因此我的链接如下所示:www.example.com/store/?discount=foo
.
When a user clicks on a discount link, it adds the parameter ?discount=foo
, so my link looks like this: www.example.com/store/?discount=foo
.
一切正常.但是在这种情况下,在查询字符串之前使用正斜杠是不好的做法吗?
Everything is functional. But is it bad practice to have the forward slash before the query string in this situation?
推荐答案
有效:
- The path component may end with a slash (
/
). - The query component starts with the first question mark (
?
) in the URI.
这篇关于查询字符串前的斜杠.不好的做法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文