Search squid archive

Re: Add a prefix/suffix if a domain is not resolved?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Olivier Sannier wrote:
Hello all,

I'm using Seamonkey without a proxy for general surfing at home and one thing that I came to like is the fact that if I type in an address that does not match any DNS record, it will try again by adding ".com" at the end if it's not already there.

It's not realistic to try all 280 common TLDs and their ~3000 common ccTLDs. What the browsers most often do is:
  a) assume that the user is living in North America and uses .com
b) send a search query ie: http://google.com/search?q=example and redirect to the first FQDN that returns (for q=example its often example.com etc).


Squid uses the settings the resolv.conf of the system it's running on. That file has a line starting with "search " followed by the possible domains you want to assume in the order to be tested. The default setting is to assume its part of the local network and use the local network master domain so "http://foo/"; goes to "foo.example.com" etc.
For example; to try .com then .net set it to "search .com .net".


Similarly, it will add "www." in front if it's not already there.

This is not possible outside the browser. Only Internet Explorer is broken this way AFAIK. Though firefox on non-windows will search your past website history to hint for any URLs and auto-complete them for you.

www.* is often (to be RFC compliant now) only provided as a stub to redirect old Internet Explorer and its people from the bad habit of adding www to everything to the real website at the domain without www, using either DNS or HTTP redirects. Websites which actually need and use it as part of the full domain name are few and slightly broken.

When I'm on the move, I often use my own squid proxy to connect to the internet and I loose this behavior because Squid replies with a "not found" page whenever there was no DNS record associated with the URL.

The solution is to learn to enter URL properly. If IANA ever cave in and enable unlimited .* TLD which are being discussed you are going to be screwed by these bad habits. (Or if you ever need to use a website without www. in it.)

Hence my question today:

Is it possible to tell Squid to retry the same query with a given suffix or prefix if said prefix/suffix is not already in the URL?
If yes, how can this be done?

see above.

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE6 or 3.0.STABLE18
  Current Beta Squid 3.1.0.13

[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux