Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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?

share|improve this question

1 Answer 1

up vote 9 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.