Click here to Skip to main content
15,886,725 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
I want to block a site when hit explicitly.For eg. a user who is logged in gmail can have access to google plus...but i want to block google plus wen hitted explicitly by the user.He can get the message box there that site is blocked.Plz Please help me
Posted
Updated 21-May-12 0:39am
v2
Comments
Manfred Rudolf Bihy 21-May-12 6:37am    
You have some explaining to do as your "question" does not make any sense so far. You could start with adding the itsy bitsy, but nevertheless quite interesting, piece about what kind application this is going to be. Then it would be really nice if you could explain what you mean by "logged in gmail"? What client are we talking about here. What the meaning of "hitted explicitly" is supposed to mean can only be told by you!

Thanks for your cooperation!
bbirajdar 21-May-12 6:40am    
Incomplete/Unclear
Shahin Khorshidnia 21-May-12 6:42am    
If the blocked site is yours then you can check the user Session while he/she is trying to open it and if they are not allowd then redirect them to somewhere else.

If the blocked site is not yours, then he/she can open the site form the address bar
yaprig 21-May-12 7:04am    
yes blocked site is mine...how to create and check for user session...I am new to web application please tell
yaprig 21-May-12 7:05am    
U got me right..i want to block the site when user open from the address bar...thnx

1 solution

I think what you are looking for is how to prevent deep linking. A deep link is a direct link to a web site’s resource without accessing the main page of the site.

See this link for more information: http://blog.hussulinux.com/2007/08/deep-linking-how-to-avoid/[^]

Another thing you can do is to check HTTP_REFERER to see how the user got to your website.
But since this information can be altered or may not be available I don't think I would use this.

http://stackoverflow.com/questions/395034/how-to-prevent-deep-linking-to-files-on-my-website[^]
 
Share this answer
 
Comments
yaprig 28-May-12 6:35am    
thnx :)

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