I tend to travel a lot around Europe, and I don't necessarily think about removing Wifi from my MacBook Air. I also keep dozens of tabs open.

Every single time I take the Thalys, or I get into some Hotel "pay-per-use" Wifi network, my MBA stupidly loads the accesspoints' login-or-register-with-credit-card-number page. While I ignore it, I do lose the pages I had open, since the damn things rewrite the URLs.

For example:

http://stackoverflow.com/questions/somenumber/somequestion

is turned into:

https://portal.thalysnet.com/?hostname=stackoverflow.com

which means I don't know what the page was about, since I might have a dozen SO tabs open at the time... all called this :/ .

Is there any way I can block "URL rewriting" on the Mac, unless specifically authorized by me?

4 Answers
4

Disable "Ask to join new networks", when selecting Wi-fi in the Network preference pane. You might also need to explicitely forget those networks if you joined them in the past, by clicking on "Advanced..." and removing any undesired network.

Once you are connected to these networks, there is no way in changing this behavior. As every request passes through their access point, they can modify it in every way they want (and return a redirect response instead for example).

I'm still perplexed that the browser would forget my request. By this I mean, if I cmd+R, I get thalys' page (which 404's since I'm not there anymore), not my initial request...
–
KheldarJan 30 '12 at 13:50

If the browser is redirected, it doesn't 'forget' the requested, it is effectively redirected and the address bar would change.
–
GerryJan 30 '12 at 22:59

Yes, I know what you mean, but my point was, I'd like some setting that says "hey M.Browser, don't trust blindly what any external server tells you, so get redirected but at least remember what I said initially". I mean, a code 301 or 307 coming from the server I hit is not the same as a response coming from a proxy :/
–
KheldarJan 31 '12 at 12:50

I had a similar problem after travelling on Thalys between Belgium and Netherlands. I also use Linux and Firefox. Clicking "Restore to Default" in Prefernces did not work for me. As soon as I tried to restore my homepage, it again redirected to the Thalys portal. In addition, a couple of saved pages in my Bookmarks menu also redirected to the Thalys portal.

I solved it using "Tools --> Clear Recent History". I set "Time range to clear" to "Everything" and checked all boxes under "Details". I probably should have checked the boxes and "Cleared" one by one to see what was causing the problem, but clearing the whole lot worked for me and there is no history that I need to keep.

I had a similar problem today after I had travelled with Thalys to Paris. I run Firefox under Linux, but perhaps this is helpful to Mac users as well.

When I got home and connected through my home network, Firefox displayed the Thalys start page instead of my regular homepage. In "Preferenses -> General" it still said my regular homepage, but it was the Thalys page I got anyway.

The problem was solved when I clicked "Restore to Default" in Preferences. After I had done that, I could set it to my regular homepage again, and this time Firefox went to it.

A colleague sitting beside me on the train who had a Mac told me that connecting through Thalys always screwed up things with the bookmarks on his Mac, so it appears that this is a general problem