Chrome浏览器不喜欢没有http://的* .loc域? [英] Chrome browser doesn't like *.loc domain without http://?

查看:118
本文介绍了Chrome浏览器不喜欢没有http://的* .loc域?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于在localhost上进行Web开发,我使用的是域名末尾带有.loc扩展名的域.

For web development on localhost I'm using domains with .loc extension at the end of a domain name.

例如:如果我在一个roses.com网站上工作,则本地开发域将是roses.loc (在hosts文件和IIS中定义为绑定中的主机头)

For example: if I work on a site roses.com, the local development domain would be roses.loc (defined in hosts file and IIS as a host-header in binding)

我首选的浏览器(我用于开发的主要浏览器是Chrome),但不幸的是 它无法将扩展名为.loc的域名识别为 http://rose.loc -每次我都会将我引到google搜索页面上开头输入rose.loc(不带http://).

My preferred browser (the main browser I use for development is Chrome) but unfortunately it does not recognize a domain name with .loc extension as http://rose.loc - it throws me onto a google search page each time I would type in rose.loc (without http://) in the beginning..

您是否以类似的方式经历过?有什么解决办法吗?

Have you experienced this in a similar way ? Is there some solution to that ?

由于在进行密集型开发测试时出于各种原因而清除了浏览器缓存并重新启动了浏览器,因此每次都忘记将它扔到google搜索页面而不是我希望注意到一些更改的开发页面时,就变得非常烦人.在网址前输入http://(Chrome始终是默认隐藏该网址的人.)

Because during intensive development testing with clearing browser cache and restarting the browser for various reasons, it's getting pretty annoying to be thrown at a google search page instead of the development page where I expect to notice some changes, each time I forget to type in http:// before the url (and Chrome is the one who hides it by default, anyway..)

推荐答案

Google Chrome对此非常聪明".它使用已知良好TLD 的列表,并假定其他所有内容只是发生的搜索字词以点号结尾,后面跟一些字符.

Google Chrome is pretty "smart" with this. It uses a list of known-good TLDs and assumes everything else is just a search term that happens to end in a dot followed with some characters.

99%的时间都很好.这只是我们"开发人员和少数具有奇怪网络设置的人,这些人必须为大多数人的利益而受苦;-)

99% of the time that's perfectly fine. It's "only" us developers and a few people with strange network setups that have to suffer for the good of the majority ;-)

您可以尝试使用.local作为您的TLD,因为这是用于引用本地域名的已定义域(至少在某些mDNS系统中已使用).

You can try using .local as your TLD, as that's a defined domain for referencing local domain names (at least it's used in some mDNS systems).

问题已在Chromium错误跟踪器中输入为#30636 .一种经常(但并非总是)可行的解决方法是将/附加到您的主机名上.因此,尝试roses.loc/.

The issue has been entered as #30636 in the Chromium bug tracker. One workaround that often (but not always) seems to work is to append / to your hostname. So try roses.loc/.

这篇关于Chrome浏览器不喜欢没有http://的* .loc域?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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