简体   繁体   English

检查用户是否来自另一个页面

[英]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.

相关问题 如何检查用户是来自我网站的不同页面还是来自其他网站? - How can I check if a user is coming from a different page of my website or from another website? 检查用户是否从另一个页面重定向 - Check if user is redirected from another page 角度检查用户是否来自whatsapp - Angular check if user is coming from whatsapp 从另一个页面回来后如何保留Google位置? - How to keep the Google place after coming back from another page? 来自其他页面时更改引导程序选项卡 - Change bootstrap tabs when coming from another page 在Ionic应用程序中,只有在刷新页面时才会加载Google Maps,而从其他页面返回时则不会加载, - In an Ionic app, Google Maps only loads when page is refreshed, but not when coming from another page, 需要使用一个组件中的复选框过滤数据,这里的数据来自另一组件中的axios - Need to filter data using check boxes in one component, here data which is coming from axios in another component 在不使用表单的情况下,使用javascript将来自服务器的数据从一页传递到另一页 - Passing data that is coming from a server, from one page to another in javascript without using forms 我如何使用来自 node.js 中另一个页面的 promise - How can i use promise that coming from another page in node.js 自动对焦在 Firefox 上不起作用,并且在来自另一个页面时不起作用 - Autofocus doesn't work on Firefox and doesn't work when coming from another page
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM