{"id":403,"date":"2006-01-23T10:24:29","date_gmt":"2006-01-23T15:24:29","guid":{"rendered":"http:\/\/kev.needham.ca\/blog\/?p=403"},"modified":"2006-01-23T10:24:29","modified_gmt":"2006-01-23T15:24:29","slug":"myspace-is-not-my-space","status":"publish","type":"post","link":"https:\/\/kev.needham.ca\/index.php\/2006\/01\/23\/myspace-is-not-my-space\/","title":{"rendered":"myspace is not my space, which isn&#8217;t your space"},"content":{"rendered":"<p>I was browsing through my weblogs over the weekend, and discovered that my bandwidth use is waaaaaaaaaay up. Most of it comes from a clip of the Drew Carey show where Richard Simmons plays the part of various props. It&#8217;s one of those clips that brings tears to your eyes, so <a href=\"\/whafa\/whoseline-simmons.wmv\" title=\"I love that it was shown on the family channel\">I&#8217;ll share for a little while longer<\/a>, then change the URL in a day or so.<\/p>\n<p>The other area that it comes from is people who use <a href=\"http:\/\/myspace.com\" title=\"illiterates of the world, unite!\">myspace<\/a> and a few forums hotlinking to images as part of their sig. I have no problems with folks downloading and hosting them elsewhere (and with all the free image hosting services, there&#8217;s no reason why they can&#8217;t), but don&#8217;t use my fircking bandwidth. It&#8217;s a common problem, unfortunately.<\/p>\n<p>Thankfully, apache&#8217;s <a href=\"http:\/\/httpd.apache.org\/docs\/1.3\/misc\/rewriteguide.html\" title=\"Don't be evil\">rewrite rules<\/a> makes dealing with the large majority of the requests originating from myspace pretty straightforward. If the browser sends a <a href=\"http:\/\/en.wikipedia.org\/wiki\/Referrer\" title=\"I spelled it correctly, at least\">referrer<\/a> (very few don&#8217;t, although programs like Norton Internet Security block them by default) from a myspace hostname, they&#8217;ll get a <a href=\"\/images\/leech.gif\">different image<\/a> than what their browser requested. <\/p>\n<p>Some folks use an image that is somewhat distasteful to punish hotlinkers, but I figure a simple message is more effective, and the image they get is only 900-odd bytes. (plus the image itself makes them <a href=\"\/images\/hotlinker.png\">look funny in their forums<\/a>, because their sig is supposed to be an expression about them). Once they clue in, they usually change things <abbr title=\"pretty damn quick\">pdq<\/abbr>.<\/p>\n<p>A little thing to be true, but I feel better about it.<\/p>\n<p>The rewrite rule, in case you were wondering, is a whole two lines:<\/p>\n<p><code>RewriteCond %{HTTP_REFERER} ^http:\/\/([^\/]+)myspace\\.com\/.*$ [NC]<br \/>\nRewriteRule \\.(jpe?g|gif|bmp|png)$ \/images\/leech.gif [L]<\/code><\/p>\n<p>Update: If you&#8217;re hosting your site on Apache using a provider, you can usually add rewrite rules using .htaccess files. <a href=\"http:\/\/www.javascriptkit.com\/\">JavaScript Kit<\/a> provides a <a href=\"http:\/\/www.javascriptkit.com\/howto\/htaccess.shtml\">well-written overview on .htaccess<\/a>, which includes a section on <a href=\"http:\/\/www.javascriptkit.com\/howto\/htaccess14.shtml\" title=\"read the other stuff, first :)\">blocking access by referrers<\/a>. Have a look-see, as it&#8217;s a great starting point for understanding how this stuff works, and what you can do to control how Apache handles page requests with your site.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I was browsing through my weblogs over the weekend, and discovered that my bandwidth use is waaaaaaaaaay up. Most of it comes from a clip of the Drew Carey show where Richard Simmons plays the part of various props. It&#8217;s one of those clips that brings tears to your eyes, so I&#8217;ll share for a [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,16],"tags":[],"class_list":["post-403","post","type-post","status-publish","format-standard","hentry","category-general","category-hwsw"],"_links":{"self":[{"href":"https:\/\/kev.needham.ca\/index.php\/wp-json\/wp\/v2\/posts\/403","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kev.needham.ca\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kev.needham.ca\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kev.needham.ca\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kev.needham.ca\/index.php\/wp-json\/wp\/v2\/comments?post=403"}],"version-history":[{"count":0,"href":"https:\/\/kev.needham.ca\/index.php\/wp-json\/wp\/v2\/posts\/403\/revisions"}],"wp:attachment":[{"href":"https:\/\/kev.needham.ca\/index.php\/wp-json\/wp\/v2\/media?parent=403"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kev.needham.ca\/index.php\/wp-json\/wp\/v2\/categories?post=403"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kev.needham.ca\/index.php\/wp-json\/wp\/v2\/tags?post=403"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}