3

I cannot block an external http header 302 redirect from pointing to my website.

I have tried all the .htaccess redirect rules. I don't have access to the http conf file, my web host assures me this cannot be done, but cannot help me block this external http header.

This is the code from the external http header:

`HTTP/1.1 302 Moved Temporarily =>`
`Date => Fri, 21 Sep 2012 07:35:15 GMT`
`Server => Apache`
`X-Powered-By => PHP/5.3.16`
`Expires => Thu, 19 Nov 1981 08:52:00 GMT`
`Cache-Control => no-store, no-cache, must-revalidate, post-check=0, pre-check=0`
`Pragma => no-cache`
`Set-Cookie => osCsid=eidbr9o47qqcjap8el0ck5la67; path=/; domain=http://nastydomain.co.uk`
`Location => http://www.mydomain.co.uk/`
`Connection => close`
`Content-Type => text/html`

Google has now spidered the website and it now looks like there are two sites with duplicate content. Google.co.uk has also said they won't do anything about this site unless I get a court order.

Any ideas how I can block 302 redirects to my site?

4

3 回答 3

2

http://www.webmasterworld.com/forum30/28329-24-30.htm在最后 2 个帖子中显示了您可以采取的唯一防御措施,但它仍然无效。

最好的方法是合法的(如果你有生意,你也应该有法律保险)或通过垃圾邮件报告或网站删除工具联系谷歌。

- 编辑 -

我能想到的最佳解决方案:由于垃圾邮件发送者使用 302 重定向:

转到谷歌的网站管理员工具,将垃圾邮件发送者网站放入您的网站管理员工具中。获取验证码,将其放在他链接到的页面的 HTML 代码中(在这种情况下是您的主索引),运行站点验证,它应该接受它。

当它被验证时,从谷歌的索引中“阻止”该网站。

额外的好处是,您现在可以控制该域的所有索引,以备将来使用。带来伤害!;-)

于 2012-09-21T08:01:44.257 回答
0

尝试阻止引用:

RewriteEngine on
RewriteCond %{HTTP_REFERER} nastydomain\.com [NC,OR]
RewriteCond %{HTTP_REFERER} www.nastydomain\.com
RewriteRule .* - [F]

更新:如果上述方法对您不起作用,您可以使用拒绝、允许指令和使用 env 来阻止。请参阅 [http://httpd.apache.org/docs/2.2/howto/access.html#env]:

SetEnvIfNoCase Referer "^http://(www.)?nastydomain.com" bad_domain=1
SetEnvIfNoCase Referer "^http://casino-poker.com" bad_domain=1

<FilesMatch "(.*)"> 
Order Allow,Deny 
Allow from all 
Deny from env=bad_domain
</FilesMatch> 

由于必须查找域名,因此使用它可能会降低性能。

于 2012-09-21T08:02:52.457 回答
0

因为他在 cookie 中发送他的域名,所以在你的 htaccess 开头试试这个:

RewriteEngine on
RewriteCond %{HTTP_COOKIE} nastydomain\.co\.uk
RewriteRule .* - [F]
于 2012-09-21T09:46:05.130 回答