第三方是302重定向到我的网站,如何停止? [英] 3rd party is 302 redirect to my website, how to stop?

查看:128
本文介绍了第三方是302重定向到我的网站,如何停止?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

编辑:

也许一个更好的TL,我的问题的医生的版本(我的大脑是一个小泥)...

Maybe a better tl;dr version of my question (my brain is a little mashed)...

无论是(理想):我能察觉转诊网址与外域的302重定向?
或者:我可以检测到302重定向被用来访问自己的网站

Either (ideally): Can I detect a referral URL with an off-domain 302 redirect? Or: Can I detect that a 302 redirect was used to access my website?

编辑2(从建议):

Request.UrlReferrer不会在这种情况下工作,它返回为简单的 https://www.google .co.uk / 。我期待或许www.google.co.uk?url=maliciouswebsite.com的参照网址 - 可惜不是

Request.UrlReferrer doesn't work in this situation, it returns as simply "https://www.google.co.uk/". I was expecting perhaps the referring URL of www.google.co.uk?url=maliciouswebsite.com - but sadly not.

一个恶意网站出现在谷歌。在谷歌点www.maliciouswebsite.com链接 - 然而,当你点击链接,你送送www.mywebsite.com

A malicious website appears in Google. The link in Google points to www.maliciouswebsite.com - however when you click the link, you get sent to www.mywebsite.com.

于是人们谷歌MaliciousWebsite,并找到自己的方式来MyWebsite。我做了一个maliciouswebsite.com DNS检查,它已被302重定向到mywebsite.com。

So people google "MaliciousWebsite" and find their way to MyWebsite. I did a DNS check on maliciouswebsite.com and it has been 302 Redirected to mywebsite.com.

我试图做的是如果请求来自MaliciousWebsite.com发送302重定向 - 不显示我的网站

What I'm trying to do is "If the request is a 302 redirect sent from MaliciousWebsite.com - do not show my website".

我需要识别该请求以某种方式源于MaliciousWebsite的一种方式。

I need a way of identifying that the request originated from MaliciousWebsite in some way.

希望是有道理的!?

推荐答案

我想既然你标记了一个问题,C#您正在使用ASP.NET。

I assume you are using ASP.NET since you tagged the question as C#.

好吧,ASP.NET提供了给你在哪里请求到您的网页源于网页地址的属性。

Well, ASP.NET offers a property that give you the address of the page where the request to your page originated from.

尝试使用

Request.UrlReferrer 

http://msdn.microsoft.com/en-us/library/system.web.htt$p$pquest.urlreferrer(v=vs.110).aspx

这篇关于第三方是302重定向到我的网站,如何停止?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆