在浏览器地址栏中的域名上强制使用 CamelCase

发布于 2024-09-10 20:38:13 字数 124 浏览 3 评论 0原文

我可以强制域名在浏览器地址栏中以驼峰命名法显示吗?所有浏览器似乎都强制域中使用小写字母。这可以通过 .htaccess 文件或其他方式来完成吗?

我一般都同意全小写默认值,但有一位客户提出了要求,并希望给出明确的答案。

Can I force a domain name to appear CamelCase in the browser's address bar? All browsers seem to force lowercase on the domain. Can this be accomplished with the .htaccess file... or some other means?

I'm generally fine with the all lowercase default, but have a client who has asked, and would like to give a definitive answer.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

烟柳画桥 2024-09-17 20:38:13

您的客户显然担心他们不理解的网络方面,并且遗憾的是他们无法改变。

如果不使用 IDN,则按照标准,域名中将禁止使用大写字符,因为大写和小写字母将被视为没有意义。

抱歉,您无法在所有浏览器中明智地执行此操作。

也许能够购买国际化域名并使用同形异义词[1]来表示大写字符。但这显然是愚蠢的,并且要求您的最终用户拥有能够正确支持此功能的浏览器

[1] http ://en.wikipedia.org/wiki/IDN_homograph_attack

Your client is clearly concerned about an aspect of the web that they do not understand and sadly for them cannot change.

Without using an IDN upper case chars are forbidden in domain names by standards as upper case and lower case are treated without significance.

You cannot do this sensibly in all browsers, sorry.

You might be able to buy an internationalized domain name and make use of Homographs[1] to represent upper case chars. But this is clearly daft and requires your end-user to have a browser that will support this properly

[1] http://en.wikipedia.org/wiki/IDN_homograph_attack

丶视觉 2024-09-17 20:38:13

可能值得检查一下为什么客户端希望在浏览器地址栏中使用驼峰式大小写?我的猜测是他们的要求与想要强制驼峰式大小写不同:)

It may be worth checking why the client wants camel case in browser's address bar? My guess is that their requirement is different from wanting to force camel case :)

去了角落 2024-09-17 20:38:13

我一直无法找到任何方法来完成此任务。显然,这是不可能的。

I have been unable to find any way to accomplish this. Apparently, it can not be done.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文