Click here to Skip to main content
15,887,596 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi everyone
recently I`ve found that some other sites redirect to my website
as an example my site name is mysite.com but another one who has same domain like mysite.org redirects to my address , i don`t want users redirect from mentioned address to my website , i`d really appreciate if anyone help me to overcome to this issue
my site is based on asp.net
thank you all
Posted
Comments
R. Giskard Reventlov 27-Jun-12 14:39pm    
What have you already tried for yourself?
Sergey Alexandrovich Kryukov 27-Jun-12 15:13pm    
Do you really think that blocking of redirection on some other site could be possible without hacking that site? I don't think it is possible in principle, would be quite curious to know if I was missing something...
--SA
R. Giskard Reventlov 27-Jun-12 17:18pm    
What the hell are you talking about? I asked him what, if anything he'd tried for himself - he may be unaware of the ramifications of what he's asking for or not really understand. Before attempting to answer, find out if there is more to it by asking the OP, not me. Think before you speak.
Mohammad Reza Valadkhani 27-Jun-12 18:26pm    
nothing special

1 solution

I'm no expert but you could request the referrer http header from the client.

http://msdn.microsoft.com/en-us/library/system.web.httprequest.headers.aspx

may help.
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 27-Jun-12 15:42pm    
So what? It does not mean blocking the redirection...
What would you advise? To generate text "We don't want to provide content for this referral"? :-)
I think blocking is just impossible, don't you think so?
--SA
Dec90 27-Jun-12 15:53pm    
well if you get the referrer you could check where it came from and if it was the other site you could redirect them to another page telling them to use the your URL or just return a blank page. you could make it a generic method in your master page if you use one. if you wanted to stop the actual redirection you would have to contact the domain owner of the other site and ask him to stop. if that doesn't work I would think you would have to seek legal advice as the domain registrar can't do anything I don't think
Mohammad Reza Valadkhani 27-Jun-12 17:53pm    
thanks for your tip , i think it`s work.
Mohammad Reza Valadkhani 27-Jun-12 17:58pm    
you think is it better to implement this method into masterpage !?
Mohammad Reza Valadkhani 27-Jun-12 18:39pm    
I`ve done it , it`s work when there was a hyperlink that redirect to a website but it`s not work on <head> <meta http-equiv="refresh" content="0; URL=http://www.mysite.com"> </head>

the guy who redirects to my site use this tag

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