加号已替换为 %252520
当我点击 Google 中的索引页面时,查询字符串中的加号将被替换(编码?)为 %252520。
有人知道为什么吗?
示例:
lovelakedistrict.com/result/?q=Private%252520car%252520park&page=2
我应该
lovelakedistrict.com/result/?q=Private+car+park&page=2
听说这是在 htaccess 中重定向我的网址的结果吗?
When I click on my index'd pages in Google the plus signs in my query string are being replaced (encoded?) for %252520.
Anyone know why?
Example:
lovelakedistrict.com/result/?q=Private%252520car%252520park&page=2
should be
lovelakedistrict.com/result/?q=Private+car+park&page=2
I have heard that this is a result of redirecting my urls in htaccess?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果 URI 查询中使用空格,则必须将其替换为
%20
(百分比编码)或通过+
(application/x-www-form-urlencoded 表单内容类型)。在您的情况下,数据似乎被编码了三次(%
使用%25
进行编码)。尝试使用以下规则将此类序列替换为
+
:If a space is used in the URI query, it must either be replaced by
%20
(percent encoding) or by+
(application/x-www-form-urlencoded content type for forms). In your case the data seems to be encoded three times (%
is encoded with%25
).Try these rules to replace such sequences it with
+
:实际上
%25
是%
字符,%20
是空格。所以看来您的 URI 被编码了三次如您所见,
%
被编码为%25
。因此,第一次,您会得到
%20
空间,然后您会得到%25
,表示%20< 的
%
/code> 后面跟着20
,然后再次使用相同的编码。在将链接提供给 Google 之前的过程中可能存在问题。
Actually
%25
is the%
char,%20
is the space. So it seems your URI was encoded three timesAs you can see, a
%
is encoded as%25
.So the first time, you get
%20
for the space, then you get a%25
for the%
of%20
followed with the20
, then, again, same encoding.There is probably something wrong in the process before the link is provided to Google.