We have a landing page which is used only for running an ad campaign. There is a website that has found this link somehow and is linking to it. I've been told by marketing they don't want that website linking to the landing page. How can I prevent a specific website from linking to our domain? I don't want to block all websites from linking to it, just this specific one. Is there solution something to do with .htaccess? If so, please provide an example of doing this or a link to example because I've been unable to find one.
|
migrated from superuser.com Mar 17 at 6:33
|
http://www.javascriptkit.com/howto/htaccess10.shtml
|
|||
|
You can't stop a site linking to you with technical measures, but you can identify requests which have come from that site/url and block these in .htaccess -
RewriteEngine on
RewriteCond%{HTTP_REFERER} ^http://www\.site\.com [NC]
RewriteRule index.html http://www.go-away.com/goaway.html [R]
The above rules will probably need some tweeking, but the idea is to match the REFERER (yes, that spelling is correct) - in this case where the referer starts with http://www.site.com - and then if they land on index.html redirect them to the url goaway.html) If you REALLY want to attempt to stop them from linking to you, I'd suggest finding out who they are and getting a lawyer to write a letter. Then follow it up with legal action if you can find grounds to. |
|||||||||
|