Click here to Skip to main content
15,904,023 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hello all,

In my web application I have a requirement in which user must navigate thru link or buttons available on page. That means users can't just copy and paste any url an open the page.

Is there any way I can do this?

Thanks in advance.
Posted

1 solution

In the pages you wish to protect, check that the http referer header is present and set to the URL of the page containing your button/link. If it's not, then you can show an error page or nothing... (or if you're really evil, redirect to a nasty URL ;) )
This is not foolproof, since the user can spoof the referer, but it's like the lock on your front door - it will keep the honest people out.

Peter
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900