如何阻止Google adsense链接到我服务器上的文件?

时间:2023-01-13 21:51:56

Today I noticed that a few Google advertisements in an adsence block on one of my pages were trying to display a file called "/pagead/badge/checkout_999999.gif" from my server. I did a bit of investigating and found out that the companies behind these adverts use Google Checkout and "checkout_999999.gif" is supposed to be a tiny shopping kart icon with a tooltip which reads "This site accepts Google Checkout".

今天我注意到我的一个页面上的adsence块中的一些谷歌广告试图从我的服务器显示一个名为“/pagead/badge/checkout_999999.gif”的文件。我做了一些调查,发现这些广告背后的公司使用Google Checkout,“checkout_999999.gif”应该是一个小小的购物卡丁车图标,其工具提示显示“此网站接受Google Checkout”。

My problem is that "/pagead/badge/checkout_999999.gif" doesn't exist on my server. What do you do to handle this on your website? e.g:

我的问题是我的服务器上不存在“/pagead/badge/checkout_999999.gif”。您在网站上如何处理此问题?例如:

  1. Save the logo (如何阻止Google adsense链接到我服务器上的文件?) on your server in the place it is expected by Google?
  2. 将徽标()保存在服务器上的Google所需的位置?

  3. Use a mod_rewrite rule to redirect the request? To where though?
  4. 使用mod_rewrite规则重定向请求?到哪里呢?

  5. Find a adsense option to turn off Google checkout enabled adverts? (I looked but couldn't see one?)
  6. 查找adsense选项以关闭启用Google Checkout功能的广告? (我看了但看不到一个?)

  7. Ignore the issue and get on with something important
  8. 忽略这个问题,继续做一些重要的事情


Back-story - please ignore unless very bored: Page 2 of the search page on our site suddenly stopped working and I didn't know why. It turned out to be related to Google adsense. We use PHP session variables to save search criteria over different pages which worked fine for a while but then randomly stopped working. Random bugs are the worst! I was trying to work out what else is random on the page and decided that the Google ads were the only other random thing. Sure enough, sometimes a particular advert seemed to clear the session variables and break the search. What was actually happening was that the advert was requesting a image from our server ("checkout_999999.gif") which didn't exist and Apache was behind-the-scenes redirecting to the site homepage which unfortunately clears the session variables needed for the search - hence the non-obvious breakage. I'm a bit worried that Google ads can request random files from my sever? I'd prefer if they could only use absolute URL's if they want to include logo's or other media.

背景故事 - 除非非常无聊,否则请忽略:我们网站上搜索页面的第2页突然停止工作,我不知道为什么。事实证明这与Google adsense有关。我们使用PHP会话变量来保存不同页面上的搜索条件,这些页面工作正常一段时间但随后停止工作。随机错误是最糟糕的!我试图找出页面上随机的其他内容,并确定Google广告是唯一的随机内容。果然,有时一个特定的广告似乎清除了会话变量并打破了搜索。实际发生的事情是广告要求我们服务器上的图像(“checkout_999999.gif”)不存在,而Apache在幕后重定向到网站主页,遗憾的是清除了搜索所需的会话变量 - 因此没有明显的破损。我有点担心谷歌广告可以从我的服务器请求随机文件?如果他们想要包含徽标或其他媒体,我宁愿他们只能使用绝对URL。

3 个解决方案

#1


Sounds like a bug with google adsense delivery. File a bug with them is your best bet for a long-term fix.

听起来像谷歌adsense交付的错误。向他们提交错误是您长期修复的最佳选择。

#2


After playing around with Apache mod_rewrite for a while I have found a rule that seems to fix my Google Adsense issue:

在使用Apache mod_rewrite一段时间之后,我找到了一条似乎可以修复我的Google Adsense问题的规则:

RewriteRule ^\/pagead\/badge\/checkout\_999999\.gif$ http://pagead2.googlesyndication.com/pagead/badge/checkout_999999.gif [R=301,L]

The problem is I'm not sure how to stop a similar thing happening in the future if Google decides to hotlink to a different file?

问题是如果谷歌决定热链接到不同的文件,我不确定如何阻止将来发生的类似事情?

#3


As Google doesn't care about the problem (previous posts were sent in June and we are now in October... and the bug was reported directely to Google), I decided to put an image on my server that would suggest the user to click on the ad!

由于谷歌并不关心这个问题(以前的帖子是在6月份发送的,而我们现在是10月份......而且这个漏洞直接报告给谷歌),我决定在我的服务器上放一个图像,建议用户使用点击广告!

Clicks then increased!!

点击然后增加!!

As this is my server, I can do what I want and that's not my problem if Google asks for files on my server. They cost me money by using my bandwidth and connecting to my server, I am now paid for that!!

由于这是我的服务器,我可以做我想做的事,如果Google要求我的服务器上的文件,这不是我的问题。他们通过使用我的带宽和连接到我的服务器花了我钱,我现在付钱了!

You should do the same...

你应该这样做......

#1


Sounds like a bug with google adsense delivery. File a bug with them is your best bet for a long-term fix.

听起来像谷歌adsense交付的错误。向他们提交错误是您长期修复的最佳选择。

#2


After playing around with Apache mod_rewrite for a while I have found a rule that seems to fix my Google Adsense issue:

在使用Apache mod_rewrite一段时间之后,我找到了一条似乎可以修复我的Google Adsense问题的规则:

RewriteRule ^\/pagead\/badge\/checkout\_999999\.gif$ http://pagead2.googlesyndication.com/pagead/badge/checkout_999999.gif [R=301,L]

The problem is I'm not sure how to stop a similar thing happening in the future if Google decides to hotlink to a different file?

问题是如果谷歌决定热链接到不同的文件,我不确定如何阻止将来发生的类似事情?

#3


As Google doesn't care about the problem (previous posts were sent in June and we are now in October... and the bug was reported directely to Google), I decided to put an image on my server that would suggest the user to click on the ad!

由于谷歌并不关心这个问题(以前的帖子是在6月份发送的,而我们现在是10月份......而且这个漏洞直接报告给谷歌),我决定在我的服务器上放一个图像,建议用户使用点击广告!

Clicks then increased!!

点击然后增加!!

As this is my server, I can do what I want and that's not my problem if Google asks for files on my server. They cost me money by using my bandwidth and connecting to my server, I am now paid for that!!

由于这是我的服务器,我可以做我想做的事,如果Google要求我的服务器上的文件,这不是我的问题。他们通过使用我的带宽和连接到我的服务器花了我钱,我现在付钱了!

You should do the same...

你应该这样做......