Change Firefox address bar behavior

In Firefox, when you type java.util.Scanner into the address bar, Firefox will attempt to connect to http://java.util.Scanner, which is not what I intended.

I have tried disabling browser.fixup.alternate.enabled to no avail.

I'm looking for a way for Firefox to perform a search using my default search engine when given anything that isn't a valid URL. Specifically in this example, I would like the address bar string java.util.Scanner end up at https://www.google.com/search?q=java.util.scanner (or whatever my default search is).


In Firefox, when you type java.util.Scanner into the address bar, Firefox will attempt to connect to http://java.util.Scanner, which is not what I intended.

If you add a ' character before any search term that looks like a url then firefox will perform a normal search.

For example:

'java.util.scanner

Will end up with the following string in the address bar:

https://www.google.com/search?q=%27java.util.scanner&ie=utf-8&oe=utf-8

And the search results will be as expected.