如何防止网页的直接访问

如何防止网页的直接访问

本文介绍了如何防止网页的直接访问?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用C#,ASP.NET,VS2005.如何防止用户直接访问网页?即,当用户输入"www.google.com/thispage"时,用户将被带回到"www.google.com".用户只能通过"www.google.com"上的链接访问"www.google.com/thispage".谢谢!任何帮助表示赞赏.

我想访问用户通过前门"(www.google.com),而不是通过手动输入(www.google.com/thispage).仅通过单击(www.google.com)上的链接/按钮,它将把用户定向到(www.google.com/thispage).

Hi I am using C#, ASP.NET, VS2005. How can I prevent users from directly accessing a webpage? i.e. when a user enters - "www.google.com/thispage" the users is directed back to "www.google.com". The users can only access "www.google.com/thispage" via a link on "www.google.com". Thanks! Anyhelp is appreciated.

I want to access a user go through the "front door"(www.google.com) and not by entering manually (www.google.com/thispage). Only by clicking a link/button on (www.google.com) then it will direct the user to (www.google.com/thispage).

推荐答案

Protected Void thispage_load(object sender, eventArgs e)
{
     Response.Redirect("www.google.com");
}



这篇关于如何防止网页的直接访问?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-18 08:26