Originally they used a bunch of tricks to intercept traffic. But with the up-rise of HTTPS and HSTS these tricks fail a lot. The solution has move however, OS and browsers perform a special DNS lookup to a domain withing their control. If this does not return the expected response the OS/Browser assumes it is the host of the portal.
Here is a more detailed explanation for Windows 7 and probably later version.
And this one is for Firefox.
We're a place where coders share, stay up-to-date and grow their careers.
We strive for transparency and don't collect excess data.