dousha2020 2013-02-05 09:53
浏览 55

如何创建将用户发送到另一个页面的链接,然后将该页面转移到与该链接相关联的另一个页面?

How do I create a link that sends the user to another page which is then diverted to another page associated with the link?

I would like to create a list of html URLS that as any one of them is clicked, it sends the user to an intermediary page, which asks the user whether they agree to the terms and conditions. If they do they are diverted to that page corresponding to that link they clicked. Similary to this diagram. enter image description here

Link 1 ==> Intermediary Page ==> Page 1,
Link 2 ==> Intermediary Page ==> Page 2,
Link 3 ==> Intermediary Page ==> Page 3,
Link 4 ==> Intermediary Page ==> Page 4,
Link 5 ==> Intermediary Page ==> Page 5

I do not know what process it called. I intend to use HTML and PHP.

  • 写回答

6条回答 默认 最新

  • drjtua5953 2013-02-05 09:59
    关注

    An approach that's used a lot goes like this:

    intermediary-page.php?proceedTo=some/url/to-go-next.php
    

    On the intermediary-page.html (or php or whatever) page you perform the necessary verifications and redirect the user to the url available in proceedTo GET variable.

    After that, it depends on your requirements. Do you want security or ensure that the user has accepted the terms and conditions or whatever? Then you should perform additional verifications on each page like so:

    Link 1 -> Page 1 (check if the user has accepted the terms already? no? then:) -> intermediary?proceedTo=page1 -> (ask the user to accept! accepted? then:) -> Page 1 (user has accepted the terms now? yes? then:) -> stay here...

    The advantages of this approach are:

    1. You are pretty sure that even if a user has bypassed the intermediary page and went straight for the final destination - (s)he will get thrown back to the intermediary page (as if you were authenticating the user).
    2. You don't need to create links like href="intermediary.php?next=abc.php", instead just go with simple href="abc.php" which will handle redirection itself.
    评论

报告相同问题?

悬赏问题

  • ¥15 自适应 AR 模型 参数估计Matlab程序
  • ¥100 角动量包络面如何用MATLAB绘制
  • ¥15 merge函数占用内存过大
  • ¥15 Revit2020下载问题
  • ¥15 使用EMD去噪处理RML2016数据集时候的原理
  • ¥15 神经网络预测均方误差很小 但是图像上看着差别太大
  • ¥15 单片机无法进入HAL_TIM_PWM_PulseFinishedCallback回调函数
  • ¥15 Oracle中如何从clob类型截取特定字符串后面的字符
  • ¥15 想通过pywinauto自动电机应用程序按钮,但是找不到应用程序按钮信息
  • ¥15 如何在炒股软件中,爬到我想看的日k线