Outlook中网址中的双斜杠 [英] Double slashes in urls in Outlook

查看:178
本文介绍了Outlook中网址中的双斜杠的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们的搜索页面的网址是这样构建的:
http://www.example.com/results/name/John/city/Miami/gender/Male 这将显示迈阿密每个名叫约翰的男性.

The url of our search page is build like this:
http://www.example.com/results/name/John/city/Miami/gender/Male This would display every male named John in Miami.

当其中一个过滤器保留为空时,网址将如下所示:
http://www.example.com/results/name/John/city//gender/Male
因此,URL中有两个斜杠.

When one of the filters is left empty, the url would be something like this:
http://www.example.com/results/name/John/city//gender/Male
So there are two slashes in the url.

Outlook似乎不喜欢这样.当您单击第二个URL时,它将删除两个斜杠之一.这样留下的网址是这样的:
http://www.example.com/results/name/John/city/gender/Male
人们把约翰称为城市中的性别".

Outlook doesn't seem to like this. When you click on the second url, it removes one of the two slashes. This leaves the url like this:
http://www.example.com/results/name/John/city/gender/Male
Persons names John in the city 'gender'..

解决此问题的最佳方法是什么?

What would be the best way to fix this problem?

推荐答案

这是Microsoft Office中的错误.

This is a bug in Microsoft Office.

RFC 2396 允许使用带有两个连续斜杠的URL.常用的.如RFC所述(摘自附录A):

URLs with two consecutive slashes are allowed by RFC 2396, but they're not commonly used. As the RFC says (extract from Appendix A):

abs_path      = "/"  path_segments
path_segments = segment *( "/" segment )
segment       = *pchar *( ";" param )

请注意,该段被定义为包含零个或更多字符. (您可能会争辩说这是一个规范错误,不应允许它...但是确实如此)

Note that segment is defined as containing ZERO OR MORE characters. (You might argue that this is a spec bug, and it shouldn't be allowed... but it is)

您已经发现,Microsoft Office将修复"包含双斜杠的URL.这显然是清洁度和一致性"的故意特征.无法覆盖或禁用它. 来源.

As you've discovered, Microsoft Office will "fix" URLs containing double slashes. This is apparently a deliberate feature for "cleanliness and consistency". There is no way to override or disable it. Source.

因此,正如其他人所建议的那样,您可能必须更改服务器格式化URL的方式.

So, as other people have suggested, you're probably going to have to change the way the server formats URLs.

这篇关于Outlook中网址中的双斜杠的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆