且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在 ASP.NET 中获取 HTTP 引荐来源网址

更新时间:2023-02-16 09:52:40

你可以使用 UrlReferrer 当前请求的属性:

You could use the UrlReferrer property of the current request:

Request.UrlReferrer

这将读取来自的 Referer HTTP 标头客户端(用户代理)可能提供也可能不提供的请求.

This will read the Referer HTTP header from the request which may or may not be supplied by the client (user agent).