<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Place of design &#187; code</title>
	<atom:link href="http://www.placeofdesign.com/tag/code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.placeofdesign.com</link>
	<description>Putting your business on the web</description>
	<lastBuildDate>Thu, 13 May 2010 13:26:30 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Protecting images online</title>
		<link>http://www.placeofdesign.com/protecting-images-online</link>
		<comments>http://www.placeofdesign.com/protecting-images-online#comments</comments>
		<pubDate>Wed, 01 Apr 2009 12:11:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Photography]]></category>
		<category><![CDATA[Superb links and snippets]]></category>
		<category><![CDATA[artist]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[photographer]]></category>
		<category><![CDATA[protect images online]]></category>
		<category><![CDATA[webdesign]]></category>

		<guid isPermaLink="false">http://www.placeofdesign.com/blog/?p=192</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<p>Protecting images on line is always a hot topic for a photographer. Below are the common methods of preventing images being copied. It is worth bearing in mind there are 3 grades of image thief</p>
<p>Type A – The casual browser / normal user<br />
Type B – The web designer (in terms of knowledge level)<br />
Type C – The hardened cyber criminal / hacker (in terms of knowledge level)</p>
<p><span id="more-192"></span></p>
<p>Your strategy will be dependant on which users you are trying to deter. The normal user will be put off with simple deterrents and give up. A person with web designer knowledge will be right in there in seconds, unless the images are protected very well protected. Protecting against the hardened cyber criminal / hacker is very hard, and needs an additional strategy</p>
<p><strong>Right click</strong><br />
You can disable the right mouse click and pop a message up about copyright. This will deter a lot of people in class A, but has the disadvantage of stopping people using “right mouseclick / back” to return to the previous page, which is how some partially sighted / blind people with text readers jump back a page. The right mouse click thing is quite annoying and doesn’t prevent your images being stolen – as disabling Java will quickly circumvent the issue</p>
<p><strong>Right click (nice alternative)</strong><br />
Offer nice popup menu on the right click – this is much more pleasing than the traditional version, and a lot more subtle, also the equivalent “back” link can be programmed in so not to upset the users who use a text reader. Again this will slow down a “A” type user. A print screen grab will still beat this method</p>
<p><strong>Transparent GIF</strong><br />
Pop photograph in a table and cover with transparent GIF.  This is quite subtle – you pop the image in a table/cell background, and stretch a 1&#215;1 transparent GIF over the top. When the user copies the file, they get a blank transparent GIF, not the photograph. This doesn’t rely on Java, and will deter most type “A” browsers. A print screen grab will still beat this method</p>
<p><strong>Chop image up</strong><br />
Here we slice the image up, and reconstruct it on the page. When the user copies the file, they get a small portion of it. This can be combined with the transparent GIF method, and will work if Java is turned off. This is likely to deter both user type “A” and User type “B” because it is too much effort to actually get the image into a usable state. A print screen grab will still beat this method</p>
<p><strong>Protect the image directory</strong><br />
This is usually the default setting on most servers nowadays &#8211; check that you can’t directly navigate to the image directory and get a directory listing (at which point you will loose all your images)</p>
<p><strong>Advanced right click (java)</strong><br />
There are some very clever methods of defeating the right click and print screen – essentially a script remaps or disables specific buttons (like the control key). This is pretty irrelevant, as disabling java defeats it. It will deter most type “A” users</p>
<p><strong>Flash</strong><br />
Contrary to popular belief, images are not secure in Flash. Yep your average type “A” user will be defeated; your average web designer can just decompile the flash code using a “Flash Decompiler” which will drop out all the images nicely</p>
<p><strong>Obfuscate source code</strong><br />
Essentially there are several methods here: firstly the source code can be “scrambled” making it pretty unreadable, preventing the human user from seeing where the image is stored. The second is to offer an alternate content when the source is viewed (which can be defeated easily)</p>
<p><strong>Use PHP</strong><br />
By using PHP to serve the images, the actual directory they are in can be hidden.  Instead of HTML files on the server there is a &#8220;program running on the server&#8221; that serves the images to the browser.   The browser doesnt get to know the real location. This will prevent most web designers from browsing the directory. The next task here is to use an abstractly named and nested directory to prevent guessing.  Using a .htaccess file to remap to correct location is sweet too. This will slow down type”B” users from taking the images en-masse</p>
<p><strong>DHTML / Javascript</strong><br />
Use a script that only displays the big picture when the mouse is over the thumbnail, and the left mouse button is depressed. This is clever, as the page won’t display anything if Java is turned off, and you can’t right mouse click while the left button is down. In combination with PHP or other methods, this will beat most type “A” and “B” users. This can prevent a screen grab of the pig picture, because the left mouse button is down</p>
<p><strong>Disable IE6 image toolbar</strong><br />
Drop the following code in a webpage header, and the IE6 image toolbar disappears</p>
<p>&lt;meta http-equiv=&#8221;imagetoolbar&#8221; content=&#8221;no&#8221; /&gt;</p>
<p><strong>Use a plugin</strong><br />
There are a few – here is an example: http://www.artistscope.net/</p>
<p>This is the most effective option we know about. The downside is that it is expensive both in terms of price, and inconvinience to the end user.  To see the images, they need to download a free plugin (just like you do for Flash)</p>
<p>This is pretty unbeatable from the browser &#8211; so type “A” and Type “B” users will not get your images</p>
<p><strong>Use a watermark</strong><br />
Ugly, but effective up to a point, also consider Digimark digital watermarking</p>
<p><strong>Publish a policy</strong><br />
Explain that you check regularly for copied content either that you use Digimark or that you check http://www.copyscape.com/ &amp; http://www.archive.org/index.php and that you always take action against image and content thieves. This actually may deter most. By showing you are proactive, most will walk away</p>
<p><strong>Review your web stats and logs</strong><br />
By reviewing your web statistics regularly, you ought to detect hot linking and unusual activity. If so, contact your ISP to Block the IP address. Hot linking is even worse than someone nicking your image – they are getting your server to actually to serve it. I.E. their webpage has your image on it, served from your web space… resulting in your bandwidth being stolen, and affecting your sites performance</p>
<p><strong>Beating the Type “C” user</strong><br />
We are talking about preventing your site from being hacked. I will only offer general advice on this but:<br />
1. Use a host you trust<br />
2. Check the versions of PHP etc. you are using, and ask about when the server was last patched<br />
3. Change your FTP and SQL passwords after the web designer has done his thing – your designer will be able to show you how to change the SQL passwords, and what files to edit<br />
4. Use “Strong passwords”<br />
5. Change your passwords often<br />
6. Keep up to speed on the updates (security) for any packages you are using (gallery packages or CMS packages for example<br />
7. Regularly change your Cpanel password<br />
8. If you have a very valuable collection of images or files, have a security audit using a firm specialising in them<br />
It is worth mentioning that most of this type of theft is pretty close to home – from a disgruntled website designer, employee etc.. So having systems where access is limited to the very few you trust, and having a clean desk policy is the way to go</p>
<p><strong>Conclusion</strong><br />
Although not an exhaustive list, we can see that it is pretty easy to make it fairly hard to copy images for the majority of surfers. However there is a third type of slippery customer that is much harder to beat…</p>
<p><strong>In the real world</strong><br />
Generally a combination of the above does a pretty good job. There are always ways around things &#8211; it’s a bit like locking your bike up outside the bank. If you don’t lock it it will walk – if you stick a cheap lock on – it will stay until someone brings some bolt cutters along</p>
<h3>About the Author</h3>
<p>Richard King is a professional photographer and website designer.  To speak to Richard call 0115 845 8953.  Richard specailises in websites for photographers and artists</p>
]]></content:encoded>
			<wfw:commentRss>http://www.placeofdesign.com/protecting-images-online/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SEO &#8211; Meta Tags</title>
		<link>http://www.placeofdesign.com/meta-tags</link>
		<comments>http://www.placeofdesign.com/meta-tags#comments</comments>
		<pubDate>Fri, 27 Mar 2009 14:29:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Search Engine Optimisation]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[META]]></category>
		<category><![CDATA[SEO]]></category>

		<guid isPermaLink="false">http://www.placeofdesign.com/blog/?p=115</guid>
		<description><![CDATA[All about META tags
We hope these pages will demystify SEO, which is not a black art. META information just is a way of you telling the search engines what to do, and what not to do, enabling them to pass relevant content to the end user

Here is an example of using META tags
Feel free to [...]]]></description>
			<content:encoded><![CDATA[<p><strong>All about META tags<br />
</strong>We hope these pages will demystify SEO, which is not a black art. META information just is a way of you telling the search engines what to do, and what not to do, enabling them to pass relevant content to the end user</p>
<p><span id="more-115"></span><strong><br />
Here is an example of using META tags</strong><br />
Feel free to cut copy paste these, but refer to the explanation below of what each tag means before altering anything. You can use all of these META tags at once. There are tricks for getting NetObjects, Dreamweaver and Front page to insert these into each page automatically. If anyone wants to know how to do this, let me know. Smart people alter the description, title and keywords tags between each page of their websites – in that way – you are not spamming the search engine, but you are maximising your exposure to any search phrase. Search engines usually rate your site PAGE BY PAGE. Some of the tags below you shouldn’t use… so read the write up before inserting the whole block</p>
<p><strong>Example of a META TAG block:</strong></p>
<blockquote><p>&lt;META http-equiv=&#8221;PICS-Label&#8221; content=&#8217;(PICS-1.1 http://www.rsac.org/ratingsv01.html&#8221; l gen false comment &#8220;RSACi North America Server&#8221; for &#8220;http://www.bwp-by-rk.co.uk&#8221; on &#8220;2006.11.06T23:37-0800&#8243; r (n 0 s 0 v 0 l 0))&#8217;&gt;<br />
&lt;META http-equiv=&#8221;PICS-Label&#8221; content=&#8217;(PICS-1.1 &#8220;http://www.classify.org/safesurf/&#8221; L gen true for &#8220;http://www.bwp-by-rk.co.uk&#8221; r (SS~~000 1))&#8217;&gt;<br />
&lt;META name rating CONTENT =&#8221; Safe for kids&#8221;&gt;<br />
&lt;META name expires CONTENT =&#8221;Mon, 01 Aug 2000 09:00:00 GMT&#8221;&gt;<br />
&lt;META http-equiv pragma CONTENT =&#8221;no-cache&#8221;&gt;<br />
&lt;META HTTP-EQUIV=&#8221;refresh&#8221; content=&#8221;5000;URL=http://www.bwp-by-rk.co.uk/&#8221;&gt;<br />
&lt;META name keywords CONTENT =&#8221;photographer, wedding, Nottingham, picture, wedding photographer, etc…”&gt;<br />
&lt;META name MSSmartTagsPreventParsing content=&#8221;TRUE&#8221;&gt;<br />
&lt;META name owner CONTENT =&#8221;Richard King&#8221;&gt;<br />
&lt;META name reply-to CONTENT =&#8221;richardking@bwp-by-rk.co.uk (Richard King)&#8221;&gt;<br />
&lt;META name resource-type CONTENT =&#8221;document&#8221;&gt;<br />
&lt;META http-equiv content-language CONTENT =&#8221;content=&#8221;en-uk&#8221;&gt;<br />
&lt;META name abstract CONTENT =&#8221;Burton Joyce’s local wedding photographer – Richard King&#8221;&gt;<br />
&lt;META name author CONTENT =&#8221;Richard King, Nott’s PC Services&#8221;&gt;<br />
&lt;META name classification CONTENT =&#8221;Photography&#8221;&gt;<br />
&lt;META name copyright CONTENT =&#8221;2006 (c) Richard King&#8221;&gt;<br />
&lt;META name description CONTENT =&#8221;Beautiful Wedding Photography by Richard King. Based in Nottingham I take images of your wedding to keep for years”&gt;<br />
&lt;TITLE CONTENT =&#8221; Beautiful Wedding Photography by Richard King &#8211; &#8220;&gt;<br />
&lt;META name distribution CONTENT =&#8221;Global&#8221;&gt;<br />
&lt;META name doc-class CONTENT =&#8221;Completed&#8221;&gt;<br />
&lt;META http-equiv expires CONTENT =&#8221;Wed, 09 Aug 2010 09:00:00 GMT&#8221;&gt;<br />
&lt;META name googlebot CONTENT =&#8221;Index, follow&#8221;&gt;<br />
&lt;META name robots CONTENT =&#8221;index, follow&#8221;&gt;<br />
&lt;META name revisit-after CONTENT =&#8221;30 days&#8221;&gt;</p></blockquote>
<p><strong><br />
So what does it all mean? Here is a blow by blow definition of each line of code:</strong></p>
<p><strong>Safety / rating info META TAGS</strong></p>
<p>These tags define how your site will be rated by both search engines and content filters. Important&#8230;Visit the following websites for more info. The sites below generate the correct code for your site on the fly</p>
<p>General information: <a href="http://www.w3.org/pics" target="_blank">http://www.w3.org/pics<br />
</a>RSAC: <a href="http://www.RSAC.org " target="_blank">http://www.RSAC.org<br />
</a>Safe Surfing: <a href="http://www.safesurf.com" target="_blank">http://www.safesurf.com<br />
</a>WEBURBIA: <a href="http://www.weburbia.com/safe" target="_blank">http://www.weburbia.com/safe</a><br />
<strong>Example tags:</strong></p>
<blockquote><p>&lt;META http-equiv=&#8221;PICS-Label&#8221; content=&#8217;(PICS-1.1 http://www.rsac.org/ratingsv01.html&#8221; l gen false comment &#8220;RSACi North America Server&#8221; for &#8220;http://www.bwp-by-rk.co.uk&#8221; on &#8220;2006.11.06T23:37-0800&#8243; r (n 0 s 0 v 0 l 0))&#8217;&gt; Options: see note above – visit the site</p>
<p>&lt;META http-equiv=&#8221;PICS-Label&#8221; content=&#8217;(PICS-1.1 &#8220;http://www.classify.org/safesurf/&#8221; L gen true for &#8220;http://www.bwp-by-rk.co.uk&#8221; r (SS~~000 1))&#8217;&gt; Options: see note above – visit the site<br />
&lt;META name rating CONTENT =&#8221; Safe for kids&#8221;&gt; Options: 14 Years / General / Mature / Restricted / Safe for Kids</p></blockquote>
<p><strong>Alter the end users browser behaviour</strong><br />
&lt;META name expires CONTENT =&#8221;Mon, 01 Aug 2000 08:21:53 GMT&#8221;&gt; This will cause a document to be reloaded from the website after the date (even if it is stored in the user&#8217;s cache). Put a date in the past to disable caching of the document.</p>
<p>&lt;META http-equiv pragma CONTENT =&#8221;no-cache&#8221;&gt; Stops the local browsers to not locally cache the web page</p>
<p>&lt;META HTTP-EQUIV=&#8221;refresh&#8221; content=&#8221;5000;URL=http://www.bwp-by-rk.co.uk/&#8221;&gt; Tells the local browser how many seconds to cache the local web page, after that time, the user will reload the page from your site, rather than use the local cached version)</p>
<p><strong>Information about the web page</strong><br />
Some of these: the website owner (for example) seem unnecessary, but are used to populate fields on some directory search engines (like YELL, Thompson)</p>
<p>&lt;META name keywords CONTENT =&#8221;your, keywords, separated, by, commas, goes, here&#8221;&gt; Further info about this will be in my next post</p>
<p>&lt;META name MSSmartTagsPreventParsing content=&#8221;TRUE&#8221;&gt; If you don&#8217;t want Microsoft products to automatically generate smart tags on your web pages, include this tag. It must be included on each page of your site for which you do not desire this feature. It has no effect on smart tags, which you insert yourself.</p>
<p>&lt;META name owner CONTENT =&#8221;Richard King&#8221;&gt; The website owner</p>
<p>&lt;META name reply-to CONTENT =&#8221;richardking@bwp-by-rk.co.uk (Richard King)&#8221;&gt; Gives a contact email, and name for reply for the web page (could open you up to SPAM</p>
<p>&lt;META name resource-type CONTENT =&#8221;document&#8221;&gt; Explains what type of resource the page is (redundant now)</p>
<p>&lt;META http-equiv content-language CONTENT =&#8221;content=&#8221;en-uk&#8221;&gt; Defines the language of the page</p>
<p>&lt;META name abstract CONTENT =&#8221;your text here&#8221;&gt; Replace &#8220;your text here&#8221; with a description of your site. This description is often used as an alternate description on search engines</p>
<p>&lt;META name author CONTENT =&#8221;Richard King, Place of design&#8221;&gt; Details who wrote the site</p>
<p>&lt;META name classification CONTENT =&#8221;Photography, Wedding&#8221;&gt; defines the classification (on a search engine) as &#8220;photographer&#8221; and “wedding”</p>
<p>&lt;META name copyright CONTENT =&#8221;2006 (c) Richard King&#8221;&gt; Copyright statement</p>
<p>&lt;META name description CONTENT =&#8221;A brief description of your site goes here&#8221;&gt; This description is used as the main description on some search engines (what the punters read. You need to be clever here with the words you use, but it must be readable</p>
<p>&lt;TITLE CONTENT =&#8221;Title of your page goes here&#8221;&gt; I will discuss the content In my next post</p>
<p>&lt;META name distribution CONTENT =&#8221;Global&#8221;&gt; &#8220;Global&#8221; Appropriate for web access. &#8220;Local&#8221; Web servers will not pass a &#8220;Local&#8221; document to the web. &#8220;IU&#8221; Internal use &#8211; Intranets.</p>
<p>&lt;META name doc-class CONTENT =&#8221;Completed&#8221;&gt; Completed/Draft/Living Document/Published describes the current state of the document</p>
<p><strong>How / when a page is indexed</strong><br />
&lt;META http-equiv expires CONTENT =&#8221;Wed, 09 Aug 2006 09:21:17 GMT&#8221;&gt; &#8211; tells the search engine when a page is no longer to be listed (useful for a promotional page)</p>
<p>&lt;META name googlebot CONTENT =&#8221;Index&#8221;&gt;Defines how the Googlebot spider indexes your site. By default, Google will attempt to spider every page you have on your site. Sometimes you will not want this to happen &#8211; you might have a series of pages that must be viewed from page 1, then 2, and 3 &#8211; in sequence. Using this tag can prevent the engine listing page 2 separately (stopping customers jumping in at page 2). You can use the ROBOTS metatag to control how all spiders index your site. The GOOGLEBOT Metatag controls exactly which pages Google indexes.</p>
<p><strong>Options:</strong> all / index, follow / noindex, follow / index,nofollow / nosnippet /noarchive /none</p>
<p>all: Same as index,follow.<br />
index,follow: The default, meaning index the page and follow all links from the page.<br />
noindex,follow Don&#8217;t index the page but do follow all links from the page.<br />
index,nofollow Index the page, but do not proceed to the links from the page.<br />
noindex,nofollow Do not index the page and do not proceed to links from the page.<br />
none Same as noindex,nofollow.<br />
<strong><br />
nosnippet From Google help:<br />
</strong>&#8220;A snippet is a text excerpt from the returned result page that has all query terms bolded. The excerpt allows users to see the context in which search terms appear on a web page, before clicking on the result. Users are more likely to click on a search result if it has a corresponding snippet.&#8221; This value of NOSNIPPET removes the text snippet.</p>
<p><strong>noarchive From Google help: </strong><br />
&#8220;Google keeps the text of the many documents it crawls available in a cache. This allows an archived, or &#8220;cached&#8221;, version of a web page to be retrieved for your end users if the original page is ever unavailable (due to temporary failure of the page&#8217;s web server). The cached page appears to users exactly as it looked when Google last crawled it. The cached page also includes a message (at the top of the page) to indicate that it&#8217;s a cached version of the page.&#8221;<br />
&#8220;If you want to prevent all robots from archiving content on your site, use the NOARCHIVE meta tag.&#8221;</p>
<p>&lt;META name robots CONTENT =&#8221;index, follow&#8221;&gt; same as the googlebot tag above, with 1 exception&#8230; noimageindex (Altavista only) Prevents the images on the page from being indexed, but the text on the page can still be indexed</p>
<p>&lt;META name revisit-after CONTENT =&#8221;30 days&#8221;&gt; Tells the search engine to visit back after Xdays, and re-spider the site</p>
]]></content:encoded>
			<wfw:commentRss>http://www.placeofdesign.com/meta-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Beating the image hotlinker</title>
		<link>http://www.placeofdesign.com/beating-the-image-hotlinker</link>
		<comments>http://www.placeofdesign.com/beating-the-image-hotlinker#comments</comments>
		<pubDate>Mon, 02 Feb 2009 10:26:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Superb links and snippets]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[bandwidth image theft]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[hotlinking]]></category>
		<category><![CDATA[referer]]></category>
		<category><![CDATA[snippet]]></category>
		<category><![CDATA[URL]]></category>

		<guid isPermaLink="false">http://www.placeofdesign.com/blog/?p=59</guid>
		<description><![CDATA[So some really (not) nice guy decides to hotlink the main image the front page of our website, and then claim to offer to work with photographers and graphic designers whilst having no content of his own&#8230; Quite flattering, but also nicking our bandwidth
To begin, lets run over how we figured this out.. 

What is [...]]]></description>
			<content:encoded><![CDATA[<p>So some really (not) nice guy decides to hotlink the main image the front page of our website, and then claim to offer to work with photographers and graphic designers whilst having no content of his own&#8230; Quite flattering, but also nicking our bandwidth</p>
<p><strong>To begin, lets run over how we figured this out.. </strong></p>
<p><strong></strong><span id="more-59"></span></p>
<p><strong>What is a hot link?<br />
</strong>A hot link is where another website essentially displays YOUR image on THIER web space without copying it.  What they do is LINK to it, so essentially your site is serving the image onto their web page.  This consumes your websites bandwidth, and is essentially stealing</p>
<p>We looked at our logs, specifically the section called &#8220;Links from an external page&#8221; (other web sites excluding search engines.  It is good practice to review your logs regularly, as you can tell all sorts of useful things ranging from the efficiency of your SEO through to who is hot linking images from your site</p>
<p><strong>What did we do?</strong><br />
Well we have a fairly neat way of combating this, using the good old .htaccess file &#8211; we simply dropped in the following code into the .htaccess code in the root directory of our website:</p>
<blockquote><p>RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?placeofdesign\.com(/)?.*$ [NC]<br />
RewriteRule \.(gif|jpe?g|png|bmp)$ naughtyfolder/imagetoreplacehotlinkedimage\.jpg[L,NC]</p></blockquote>
<p>What this code does is basically <strong>swap the hot linked image</strong>, with the following image found in the naughty folder &#8211; how cool is that! This means that the following image is now being displayed on the offending webpage, and untill they notice, and remove the link to our image</p>
<p><a href="http://www.placeofdesign.com/blog/wp-content/uploads/2009/02/humiliatingimage1.gif"><img class="alignnone size-medium wp-image-61" title="naughty image" src="http://www.placeofdesign.com/blog/wp-content/uploads/2009/02/humiliatingimage1-300x118.gif" alt="humiliatingimage1 300x118 Beating the image hotlinker " width="300" height="118" /></a></p>
<p><strong>How does this code work?</strong><br />
To begin we turn on the Mod Rewriting engine &#8211; this allows you to transform URLs from one thing to another at the server level.  The code then conditionally looks at the the referrer.  In the case the referring URL is not from our domain name, we replace the image served with an alternative</p>
<p><strong>Why not just block the IP address?</strong><br />
Blocking the IP address would achieve the same result, but we would have to do this for each infringement one by one.  For sure it is a good option for serial offenders.  The other issue with IP addresses is that they are recycled.  The sort of organisation that hotlinks images, will just move server, or get booted off their server.  The last thing we want to do is block a valid referrer.  This is why this method is cool, because we are not blocking ranges of IP addresses to our domain and driving away potentially valid traffic</p>
<p><strong>How about if we want the images to be hot linked?</strong><br />
In the instance where we wanted to allow an image to be hot linked &#8211; for example a photographer posting an image on a forum for critique, then you can allow more domains by adding more allowed domain into the conditional part of the code</p>
<blockquote><p>Example: RewriteCond	%{HTTP_REFERER}	!myfavephotography website\.com			[NC]</p></blockquote>
<p><strong><br />
Or if you wish to allow Google to show your images in the image search:</strong></p>
<blockquote><p>RewriteCond	%{HTTP_REFERER} 	!^http://(www\.)?google\.			[NC]</p></blockquote>
<p><strong>The complete code in this instance would be:</strong></p>
<blockquote><p>RewriteEngine on<br />
RewriteCond %{HTTP_REFERER} !^$<br />
RewriteCond %{HTTP_REFERER} !^http://(www\.)?placeofdesign\.com(/)?.*$ [NC]<br />
RewriteCond	%{HTTP_REFERER}	!^http://(www\.)?myfavephotographywebsite\.com			[NC]<br />
RewriteCond	%{HTTP_REFERER} !^http://(www\.)?google\.			[NC]<br />
RewriteRule \.(gif|jpe?g|png|bmp)$ naughtyfolder/imagetoreplacehotlinkedimage.jpg[L,NC]</p></blockquote>
<p>Feel free to leave a comment or drop us an email if you have any questions</p>
]]></content:encoded>
			<wfw:commentRss>http://www.placeofdesign.com/beating-the-image-hotlinker/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
