Trang web này sẽ có chức năng hạn chế trong khi chúng tôi trải qua bảo trì để cải thiện trải nghiệm của bạn. Nếu một bài viết không giải quyết được vấn đề của bạn và bạn muốn đặt câu hỏi, chúng tôi có cộng đồng hỗ trợ của chúng tôi đang chờ để giúp bạn tại @FirefoxSupport trên Twitter và /r/firefox trên Reddit.

Tìm kiếm hỗ trợ

Tránh các lừa đảo về hỗ trợ. Chúng tôi sẽ không bao giờ yêu cầu bạn gọi hoặc nhắn tin đến số điện thoại hoặc chia sẻ thông tin cá nhân. Vui lòng báo cáo hoạt động đáng ngờ bằng cách sử dụng tùy chọn "Báo cáo lạm dụng".

Tìm hiểu thêm

Not fixed: Re: MAJOR BUG: Firefox ignores the hosts file

  • 2 trả lời
  • 8 gặp vấn đề này
  • 1 lượt xem
  • Trả lời mới nhất được viết bởi Felicia

more options

A previous issue that was created here, https://support.mozilla.org/en-US/questions/1011327, is not resolved. Firefox's behavior is simply wrong.

The problem has to do with Firefox searching strings in the the address bar when no keyword is specified.

If I type the name of a host in my machine's host file, Firefox should behave like any other app (for example ping) and consult the hosts file.

But instead it assumes that the string is something the user wants to search for. This without the user having entered a keyword for a search.

For example if a user has the keyword g set to search google.com, then if they enter "g somestring" in the address bar, it *should* search google for somestring.

But if the user enters "somestring" alone in the address bar, Firefox should not force a search for it, completely bypassing the hosts file.

A previous issue that was created here, https://support.mozilla.org/en-US/questions/1011327, is not resolved. Firefox's behavior is simply wrong. The problem has to do with Firefox searching strings in the the address bar when no keyword is specified. If I type the name of a host in my machine's host file, Firefox should behave like any other app (for example ping) and consult the hosts file. But instead it assumes that the string is something the user wants to search for. This without the user having entered a keyword for a search. For example if a user has the keyword g set to search google.com, then if they enter "g somestring" in the address bar, it *should* search google for somestring. But if the user enters "somestring" alone in the address bar, Firefox should not force a search for it, completely bypassing the hosts file.

Giải pháp được chọn

Firefox has changed a lot since that old thread, but the current default behavior is to search first and check DNS in the background. When Firefox detects a hostname, it should display an infobar asking if you wanted to access that hostname, and then if you click through, add a preference to do that from now on for that hostname. I have attached a screen shot illustrating this.

To force Firefox to do a DNS lookup first, you can use this setting:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste fix and pause while the list is filtered

(3) Double-click the browser.fixup.dns_first_for_single_words preference to switch it from false to true

Does that work for you?

Đọc câu trả lời này trong ngữ cảnh 👍 2

Tất cả các câu trả lời (2)

more options

Giải pháp được chọn

Firefox has changed a lot since that old thread, but the current default behavior is to search first and check DNS in the background. When Firefox detects a hostname, it should display an infobar asking if you wanted to access that hostname, and then if you click through, add a preference to do that from now on for that hostname. I have attached a screen shot illustrating this.

To force Firefox to do a DNS lookup first, you can use this setting:

(1) In a new tab, type or paste about:config in the address bar and press Enter/Return. Click the button promising to be careful.

(2) In the search box above the list, type or paste fix and pause while the list is filtered

(3) Double-click the browser.fixup.dns_first_for_single_words preference to switch it from false to true

Does that work for you?

more options

Thanks that is the solution! Works perfectly now!