dosin84644 2012-09-11 13:52
浏览 77

浏览器的重定向

I'm writing an internet access tool for a LAN that uses Linux + iptables to redirect to a login page everytime a user tries to access to any web page. That login page asks for user and password and if the authentication was successful, it removes the iptables rule so the subsequent requests goes to the originally intended webpage.

This is the situation:

  1. If I go to http://www.abc.com, my default gw redirects me to 10.0.10.10/login.php
  2. I successfully login.
  3. If I try to go again to http://www.abc.com, the browser is automatically sending me back to 10.0.10.10, it's like some sort of caching.
  4. If I try to enter to another page other than abc.com, it works as expected.

How can I tell the browser to remove the "remembered" rule of redirection?

  • 写回答

3条回答 默认 最新

  • dongyun7897 2012-09-11 13:55
    关注

    You need to Hard Refresh cache.

    Usually you can do that with <kbd>CTRL</kbd>+<kbd>F5</kbd> or <kbd>CTRL</kbd>+<kbd>R</kbd>

    or you change your rule to make the second redirection to same page but with some # fragment identifier

    eg: if user enters abc.com and gets redirected on login if he tries to go again to abc.com and you see that he was logged in redirect him to abc.com#1

    评论

报告相同问题?

悬赏问题

  • ¥15 基于单片机的靶位控制系统
  • ¥15 AT89C51控制8位八段数码管显示时钟。
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 下图接收小电路,谁知道原理
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测
  • ¥15 ETLCloud 处理json多层级问题
  • ¥15 matlab中使用gurobi时报错