Is there any way to check if the page came from an external source

Using C #, I'm going to personalize the page if its first page hits.

I don't care if the solution is bulletproof, because this function is purely asta and can get worse.

It should use the ASP.NET method, not JavaScript.

+4
source share
2 answers

with

Request.UrlReferrer.Host

You can get the URL of a previous client request. But this will not work with https from external pages

+7
source

I think you should use this

Url referel

This property contains the URL of the previous page, so you can check if the current request from your site is valid.

+2

Source: https://habr.com/ru/post/1584894/


All Articles