[英]Check if user is coming from a another page
I'm very new to this, but i need something in javascript made very simple.我对此很陌生,但我需要 javascript 中的一些非常简单的东西。 I have a blog channel where i earn money from shortning links, only problem is everyone is bypassing them but on the site itself i can write javascript code for my monitized links.我有一个博客频道,我通过缩短链接赚钱,唯一的问题是每个人都在绕过它们,但在网站本身我可以为我的 monitized 链接编写 javascript 代码。
So i need way when the user (visitor) is trying to bypass my monitized link on one of those bypass sites it needs to checks if they are coming from a certain domain like 'thebypasser.com' 'linkvertisebypasser.com' etc. If so throw them back with a error to my website blog.因此,当用户(访问者)试图绕过其中一个旁路站点上的我的 monitized 链接时,我需要一种方法,它需要检查它们是否来自某个域,如“thebypasser.com”、“linkvertisebypasser.com”等。如果是这样将它们错误地扔回我的网站博客。
I'd appreciate it very much if anyone could help me out here如果有人能帮助我,我将不胜感激
No experience in javascript无经验javascript
When the user comes from a specific website (say, google.com
), the request has Referer: https://www.google.com/
header当用户来自特定网站(例如google.com
)时,请求具有Referer: https://www.google.com/
header
https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Referer
This is generally the only information you can obtain from user's browser (the server-side of as website can share some more info)这通常是您可以从用户浏览器获取的唯一信息(网站的服务器端可以共享更多信息)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.