... HOW is this the "best answer"??? The original problem is something redirecting you from one page to another. Either I REALLY don't understand IT (possible; I do physics-y math and coding), or this is addressing a similar but different problem.
Well, for some, it is a part of the source of the problem.
Consider this : Today's attacks or virus/trojan makers know that it's only a matter of time before any active Antivirus companies find a way to detect their stuff when it's on a HDD. Then, how can their *censored* overcome that difficult wall? Simply by attacking, first, the least protected device connected... and that's the router firmware.
Even better for them, most android devices requires a wireless connection to that device (router) to access Internet. It's like the ideal virus/trojan's cup holder since antivirus on mobile/tablet doesn't really scan visited website "before" loading them up like it does on regular computers. (Otherwise, it would requires too much battery usage and no clients would be satisfied that their battery last half of it original charged time because of the antivirus being more active.)
It's not a direct process, but more like this:
1) An Ads databank is infiltrated with a bad Ads which include a hidden API.
2) When the ads runs in the Android device, it download and read the hidden API.
3) The hidden API communicate with the router from within the network, which doesn't have any kind of firewall. (The router firewall that protect it only act on data loaded from the web, not from the devices.)
4) This API function install a new firmware update into the router that includes specific calls whenever the "current" device connects to it. Its calls can includes anything from installing an adware from a specific web address to redirection from specific webpages. (For example, it can easily take a "sample" of your current browsers' homepage address string and put a redirection toward a malicious website.)
It's quite easy to guess "why" someone would do something like this and that explain why it goes the extra miles to ensure it's effectively working on as many devices as possible : Money.
A regular virus or Trojan that "lock" something up or break the device doesn't produce anything other than hatred and whenever someone is found out doing it, it always ends up with legal action being taken against them. Even more, it doesn't generate any kind of revenues unless the attack is aimed toward specific individuals and funded by some third party. (You know... cyber-war and stuff. Still, "paid" virus/trojan doesn't concerns 99.999% of the stuff around on the net.)
This kind of system isn't as illegal as it comes within another a system that every users agree to which include a part saying "We're not responsible of any damage, change or effect our application may create on your device." (When you install an app (game or not) from Google Play, you agree to this each time... even if some of those game uses a unsecured Ads API downloaded from the web to fund themselves.)
Instead of making people suffer with broken or locked devices, they make uses of the users' browsers by forcing them to display legal real ads to the users' screen. Remember that anytime someone "load" an ads, it add +1 to the counter of that ads frame and the one who registered this active Ads frame (guess who) gets money out of it. (It's usually around 0.80$US per 1000 views where the ads are sold at 1$/1000 views while the "ads hosting" keeps 20%)
This is why those redirected page are filled to the grim with an ads from every kind of PPI (Pay-Per-Impression (or Views)) based companies.
If 1000 people has this redirection, each time they all open their browser, this give 80 cents to the guy or woman who created that hidden API stuck into the ads that can be displayed in any Apps that makes uses of in-app ads.