转发到特定 URL
我想要的:
- 用户输入“gmail.com”。
- Web 浏览器中会出现一条消息,指出“您正在访问第三方电子邮件服务......等等......”。
- 用户将可以选择通过单击特定链接继续操作 指向“gmail.com”。
我做了什么:使用 DNS 转发 A 记录转发到存储消息的服务器的内部 IP。
会发生什么:当用户想要继续访问“gmail.com”时单击提供的链接时,会发生环回内部 IP
是否有其他方法可以做到这一点?除了 DNS 之外?
What I want to have:
- User enters 'gmail.com'.
- A message in the web browser appears stating some like "You are accessing third party email service... and so on..".
- User will be given option to proceed by clicking certain link
pointing to 'gmail.com'.
What I did: Use DNS forward A record forwarding to internal ip of server where message is stored.
What happens: Loop back to internal ip occurs when user clicks provided link when user wants to proceed to 'gmail.com'
Is there any other way possible to do this? other than DNS?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
这可以通过使用代理服务器(例如鱿鱼)来实现。如果源/客户端已经被重定向到这样的“警告消息页面”,您可以放置一个自定义应用程序/脚本来对源/客户端进行某些检查。例如,您可以将原始网址附加到重定向网址的末尾,以便您可以轻松地在网站上放置链接。
http://wiki.squid-cache.org/Features/Redirectors
It is possible by using a proxy server such as squid. You can place a custom app/script to make certain checks on the source/client if he already have been redirected to such a "warning message page". You can for example append the original url to the end of your redirect url so you can easily place a link on the site.
http://wiki.squid-cache.org/Features/Redirectors
您可以在 DNS 服务器上放置代码,以跟踪谁已被重定向以及谁可以自由访问该链接。它需要有某种数据库并存储不需要重定向的用户的 MAC 地址。
You could place code on the DNS server which keeps track of who has been redirected and who's free to go to the link. It'd need to have some kind of database and store MAC addresses of users who don't need to be redirected.