Click here to Skip to main content
Sign Up to vote bad
good
See more: C#
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 21 May '12 - 0:13
yaprig630
Edited 21 May '12 - 0:39

Comments
Manfred R. Bihy - 21 May '12 - 6:37
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!
B Birajdar - 21 May '12 - 6:40
Incomplete/Unclear
Shahin Khorshidnia - 21 May '12 - 6:42
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:04
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:05
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[^]
  Permalink  
Comments
yaprig - 28 May '12 - 6:35
thnx :)

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

  Print Answers RSS
Your Filters
Interested
Ignored
     
0 Sergey Alexandrovich Kryukov 365
1 OriginalGriff 315
2 Slacker007 240
3 Dave Kreskowiak 212
4 Aarti Meswania 210
0 Sergey Alexandrovich Kryukov 8,893
1 OriginalGriff 7,134
2 CPallini 3,678
3 Rohan Leuva 3,036
4 Maciej Los 2,428


Advertise | Privacy | Mobile
Web04 | 2.6.130516.1 | Last Updated 21 May 2012
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid