2

I am having a weird issue with Firefox with localhost.

When I got to:

http://localhost/mysite/mypage.html

It brings up google search:

Your search - localhost/mysite/mypage.html - did not match any documents. 

But other times...it brings up my page in Firefox.

It works consistently in Chrome (I always see my web page)

Is there a setting on Firefox I can change to prevent this?

nicole
  • 769
  • 3
  • 10
  • 15
  • 1
    Possible duplicate of [How to prevent Firefox converting 'localhost/\*' URLs into search queries?](https://superuser.com/questions/382905/how-to-prevent-firefox-converting-localhost-urls-into-search-queries) – Ƭᴇcʜιᴇ007 Apr 11 '17 at 21:07

1 Answers1

9

That's most likely because you have a space somewhere, Firefox sends it to search instead of substituting %20. Firefox will only replace spaces when it recognises you typing an address. Firefox doesn't automatically recognise localhost as a domain the same way it recognises *.com (etc), apparently, so it assumes you want to search. Your basic options are:

  • Don't have any spaces in your site URLs, underscores work
  • Manually put %20 instead of spaces when typing the URL in
  • Actually type the http:// in, i.e. type http://localhost/ instead of localhost/
  • Disable address bar searching

To disable address bar searching, navigate to about:config and set keyword.enabled to false.

Bob
  • 60,938
  • 25
  • 191
  • 216