I don't think there is currently a fix for this in Safari
The behavior used to be that, if you typed in a value where a name lookup failed, it would append .com to it and try a lookup, and if that failed, prepend www. and try a lookup for that (I believe that was the sequence, but it's been a while since it behaved that way). If any of those succeeded, it would load the site you wanted. This behavior allowed it to use the domain search value(s) from /etc/resolve.conf and hostnames and aliases from /etc/hosts.
Now, the behavior is apparently that if the value you enter doesn't "look like" a valid hostname, it will skip the lookups altogether and do a search using your default search provider (Safari Preferences/General). It's pretty annoying if, for example, you have a bunch of /etc/hosts entries so you can just type in a short alias and have it quickly load a site (in which case the search results are usually worthless to you). Firefox seems to at least go through the process of a lookup before sending you off to the search provider, whereas, Safari apparently skips the lookup if the value doesn't look like a hostname..
The only workaround seems to be to load the site/page once using the full hostname, then, for subsequent access, use the Top Hits section from the suggestions list to pick the url you actually want. Often, if it's a relatively unique name, it may be pre-selected for you. I found it works best if Safari Preferences/Privacy/Prevent search engine from providing suggestions is checked.
So, for example, once you load 'webcam2.lastname.ch' once, you swhould be able to start typing 'webcam2' and that site should show up in the Top Hits, perhaps even preselected, so you can just hit enter. How well this works depends on how many other sites you go to with similar names and how frequently you go to them.