Unfortunately, it is impossible to set arbitrary URL prefix for search engine.
This is partially due to the fact that query format embedded in the rest of the URL is unknown and specific to the selected search engine URL prefix. For example, if you want to use Google search of specific country (like Google Australia), it's impossible to set "https://google.com.au/" somewhere and use it.
Firefox requires a plugin to form the second part of the URL. The solution is to use one of the plugins listed on this page: http://mycroftproject.com/google-search-plugins.html
Then, go to "Preferences" -> "Search" -> set "Default Search Engine" to "Google Australia".