<?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>Simon Whatley &#187; Development</title>
	<atom:link href="http://www.simonwhatley.co.uk/topic/development/feed" rel="self" type="application/rss+xml" />
	<link>http://www.simonwhatley.co.uk</link>
	<description>The opposite of every great idea is another great idea</description>
	<lastBuildDate>Wed, 02 Nov 2011 09:28:34 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Delete WordPress Post Revisions</title>
		<link>http://www.simonwhatley.co.uk/how-to-delete-wordpress-revisions</link>
		<comments>http://www.simonwhatley.co.uk/how-to-delete-wordpress-revisions#comments</comments>
		<pubDate>Wed, 10 Aug 2011 22:18:11 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[database]]></category>
		<category><![CDATA[house keeping]]></category>
		<category><![CDATA[maintenance]]></category>
		<category><![CDATA[post revisions]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=4719</guid>
		<description><![CDATA[WordPress has a nice little feature of saving revisions of your posts whilst you're editing them. This is great if you need to roll back to a previous revision. However, after you've published a post, it's unlikely you'll need the old revisions.]]></description>
			<content:encoded><![CDATA[<p>WordPress has a nice little feature of saving revisions of your posts whilst you&#8217;re editing them. This is great if you need to roll back to a previous revision. However, after you&#8217;ve published a post, it&#8217;s unlikely you&#8217;ll need the old revisions.</p>
<p>The following <abbr title="Structured Query Language">SQL</abbr> can be used to delete the old post revisions and free up some space for your database.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">DELETE a,b,c
FROM wp_posts a
LEFT JOIN wp_term_relationships b ON (a.ID = b.object_id)
LEFT JOIN wp_postmeta c ON (a.ID = c.post_id)
WHERE a.post_type = 'revision'</pre></div></div>

<p>Of course, it&#8217;s a good idea to back up your database prior to deleting anything.</p>
<p>If you don&#8217;t want or need post revisions, you can add this line to your <code>config.php</code> to turn them off completely.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">define('WP_POST_REVISIONS', false);</pre></div></div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/how-to-delete-wordpress-revisions/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>3 Free eBooks on jQuery</title>
		<link>http://www.simonwhatley.co.uk/3-free-ebooks-on-jquery</link>
		<comments>http://www.simonwhatley.co.uk/3-free-ebooks-on-jquery#comments</comments>
		<pubDate>Tue, 19 Jul 2011 21:33:15 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[ebooks]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=4489</guid>
		<description><![CDATA[jQuery, a JavaScript library, is definitely something worth knowing. Here are some resources to help you learn and master it.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2011/07/jquery_logo-300x73.png" alt="" title="jQuery" width="300" height="73" class="aligncenter size-medium wp-image-4495" /></p>
<p>jQuery, a JavaScript library, is definitely something worth knowing. Here are some resources to help you learn and master it.</p>
<ul>
<li><a href="http://jqfundamentals.com/book/index.html" title="jQuery Fundamentals" target="_blank" rel="nofollow">jQuery Fundamentals</a> by <a href="http://www.rebeccamurphey.com/" title="Rebecca Murphey" target="_blank" rel="nofollow">Rebecca Murphey</a>, with contributions from <a href="http://james.padolsey.com/" title="James Padolsey" target="_blank" rel="nofollow">James Padolsey</a>, <a href="http://paulirish.com/" title="Paul Irish" target="_blank" rel="nofollow">Paul Irish</a> and others, is a free e-book available in <abbr title="HyperText Markup Language">HTML</abbr>. It includes an overview of JavaScript as its first chapter, to help developers get up to speed.</li>
<li><a href="http://addyosmani.com/blog/essentialjsdesignpatterns/" title="Essential JavaScript &#038; jQuery Design Patterns" target="_blank" rel="nofollow">Essential JavaScript &#038; jQuery Design Patterns</a> by <a href="http://addyosmani.com/blog/" title="Addy Osmani" target="_blank" rel="nofollow">Addy Osmani</a> is a free e-book of design patterns for those who already know jQuery but want to take their skills to the next level.</li>
<li><a href="http://docs.jquery.com/Main_Page" title="Official jQuery Documentation" target="_blank" rel="nofollow">Official jQuery Documentation</a></li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/3-free-ebooks-on-jquery/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A Quick Way to Help Optimise MySQL Databases</title>
		<link>http://www.simonwhatley.co.uk/a-quick-way-to-help-optimise-mysql-databases</link>
		<comments>http://www.simonwhatley.co.uk/a-quick-way-to-help-optimise-mysql-databases#comments</comments>
		<pubDate>Thu, 19 May 2011 10:27:17 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[analyse]]></category>
		<category><![CDATA[analyze]]></category>
		<category><![CDATA[help]]></category>
		<category><![CDATA[msql]]></category>
		<category><![CDATA[optimisation]]></category>
		<category><![CDATA[optimise]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[SQL]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=4154</guid>
		<description><![CDATA[The ANALYSE() procedure built into MySQL can give you a wealth of information about your database tables, making it easy to find out which tables need optimising.]]></description>
			<content:encoded><![CDATA[<p>Generally, if you want to analyse a MySQL table you can use the following command.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">ANALYZE TABLE table_name</pre></div></div>

<p>However, this doesn&#8217;t give you much information beyond &#8220;status=OK&#8221;.</p>
<p>Alternatively, the <code>ANALYSE()</code> procedure built into MySQL can give you a wealth of information about your database tables, making it easy to find out which tables need optimising.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">SELECT * FROM table_name PROCEDURE ANALYSE()</pre></div></div>

<p><em>NB. change table_name to be your desired table name&#8230;obviously! Oh and &#8220;analyse&#8221; is the English (UK) spelling.</em></p>
<p>You’ll get a number of results back including the minimum/maximum value, minimum/maximum length, number of empty or zero strings, number of nulls, the average value/length, the standard deviation, and a suggested optimal field type for every row in the queried table.</p>
<p>Of course, optimising your tables isn&#8217;t necessarily that helpful if you don&#8217;t have much data. Furthermore, optimisation isn&#8217;t simply a case of running the <code>OPTIMIZE TABLE</code> function on each of your tables.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/a-quick-way-to-help-optimise-mysql-databases/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>The Cathedral and the Bizarre</title>
		<link>http://www.simonwhatley.co.uk/the-cathedral-and-the-bizarre</link>
		<comments>http://www.simonwhatley.co.uk/the-cathedral-and-the-bizarre#comments</comments>
		<pubDate>Wed, 18 May 2011 07:56:29 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Design]]></category>
		<category><![CDATA[Development]]></category>
		<category><![CDATA[bottom-up]]></category>
		<category><![CDATA[engineering]]></category>
		<category><![CDATA[Eric S. Raymond]]></category>
		<category><![CDATA[fetchmail]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[methods]]></category>
		<category><![CDATA[observation]]></category>
		<category><![CDATA[Process]]></category>
		<category><![CDATA[software]]></category>
		<category><![CDATA[top-down]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=4134</guid>
		<description><![CDATA[The Cathedral and the Bazaar is an essay by Eric S. Raymond on software engineering methods, based on his observations of the Linux kernel development process and his experiences managing an open source project, fetchmail. It examines the struggle between top-down and bottom-up design.]]></description>
			<content:encoded><![CDATA[<p><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2011/05/Cathedral-and-the-Bazaar-book-cover-194x300.jpg" alt="" title="The cathedral and the bizarre" width="194" height="300" class="alignleft size-medium wp-image-4137" />The Cathedral and the Bazaar is an essay by Eric S. Raymond on software engineering methods, based on his observations of the Linux kernel development process and his experiences managing an open source project, fetchmail. It examines the struggle between top-down and bottom-up design.</p>
<p>The essay contrasts two different free software development models: <em>The Cathedral model</em>, in which source code is available with each software release, but code developed between releases is restricted to an exclusive group of software developers; and, <em>The Bazaar model</em>, in which the code is developed over the Internet in view of the public.</p>
<p>The essay helped convince most existing open source and free software projects to adopt Bazaar-style open development models, fully or partially</p>
<p><strong>Raymond posits that there are 19 guidelines for creating good open source software:</strong></p>
<ol>
<li>Every good work of software starts by scratching a developer&#8217;s personal itch.</li>
<li>Good programmers know what to write. Great ones know what to rewrite (and reuse).</li>
<li>Plan to throw one away; you will, anyhow.</li>
<li>If you have the right attitude, interesting problems will find you.</li>
<li>When you lose interest in a program, your last duty to it is to hand it off to a competent successor.</li>
<li>Treating your users as co-developers is your least-hassle route to rapid code improvement and effective debugging.</li>
<li>Release early. Release often. And listen to your customers.</li>
<li>Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone.</li>
<li>Smart data structures and dumb code works a lot better than the other way around.</li>
<li>If you treat your beta-testers as if they&#8217;re your most valuable resource, they will respond by becoming your most valuable resource.</li>
<li>The next best thing to having good ideas is recognizing good ideas from your users. Sometimes the latter is better.</li>
<li>Often, the most striking and innovative solutions come from realizing that your concept of the problem was wrong.</li>
<li>Perfection (in design) is achieved not when there is nothing more to add, but rather when there is nothing more to take away.</li>
<li>Any tool should be useful in the expected way, but a truly great tool lends itself to uses you never expected.</li>
<li>When writing gateway software of any kind, take pains to disturb the data stream as little as possible &#8211; and never throw away information unless the recipient forces you to!</li>
<li>When your language is nowhere near Turing-complete, syntactic sugar can be your friend.</li>
<li>A security system is only as secure as its secret. Beware of pseudo-secrets.</li>
<li>To solve an interesting problem, start by finding a problem that is interesting to you.</li>
<li>Provided the development coordinator has a communications medium at least as good as the Internet, and knows how to lead without coercion, many heads are inevitably better than one.</li>
</ol>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/the-cathedral-and-the-bizarre/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Run Two Versions of Firefox on Mac OSX</title>
		<link>http://www.simonwhatley.co.uk/run-two-versions-of-firefox-on-mac-osx</link>
		<comments>http://www.simonwhatley.co.uk/run-two-versions-of-firefox-on-mac-osx#comments</comments>
		<pubDate>Wed, 30 Mar 2011 09:03:52 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[CSS3]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Firefox 4]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Mozilla]]></category>
		<category><![CDATA[OSX]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3958</guid>
		<description><![CDATA[Last week Firefox 4.0 was released to the world. Web developers everywhere celebrated with delight, the new browser. Well, almost! The browser comes packed with a super-fast JavaScript engine called J&#228;gerMonkey, improved support for HTML5 and CSS3 and a bunch of new interface updates.]]></description>
			<content:encoded><![CDATA[<p>Last week Firefox 4.0 was released to the world. Web developers everywhere celebrated with delight, the new browser. Well, almost!  The browser comes packed with a <a href="http://www.mozilla.com/en-US/firefox/4.0/releasenotes/" title="Firefox 4.0 release notes" target="_blank" rel="nofollow">super-fast JavaScript engine called J&auml;gerMonkey, improved support for HTML5 and CSS3 and a bunch of new interface updates</a>. But don’t get too excited just yet! It&#8217;s still a good idea to keep that old version of Firefox around for testing; we can’t assume everyone has upgraded to Firefox 4. So, to run both Firefox 3.6 and Firefox 4.0 on the same machine, just follow these simple steps:</p>
<ol>
<li>Open up your Applications folder and find your old version of Firefox.</li>
<li>Right click -> Get Info.</li>
<li>Rename to &#8220;Firefox36.app&#8221;.</li>
<li>Download Firefox 4.0 and install as normal.</li>
</ol>
<p>Voil&agrave;! You now have more than one Firefox browser to play with.</p>
<p>That was really simple huh? If someone knows how to do this on the Windows and Linux side, I would love to hear how.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/run-two-versions-of-firefox-on-mac-osx/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Apache RewriteRule and query strings</title>
		<link>http://www.simonwhatley.co.uk/apache-rewriterule-and-query-strings</link>
		<comments>http://www.simonwhatley.co.uk/apache-rewriterule-and-query-strings#comments</comments>
		<pubDate>Fri, 18 Feb 2011 10:56:20 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[SES]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[URL rewriting]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3855</guid>
		<description><![CDATA[At first glance, the way the Apache mod_rewrite module handles query strings can be a little intimidating. mod_rewrite works by sitting on your server in a file called htaccess, and “catching” requests for URL‘s. It then checks these URL request against a series of rules and conditions you have set. If the request meets any of the rules and conditions, it applies then necessary changes to the URL, then reprocesses the request with the changes you have directed.]]></description>
			<content:encoded><![CDATA[<p>At first glance, the way the Apache <code>mod_rewrite</code> module handles query strings can be a little intimidating. <code>mod_rewrite</code> works by sitting on your server in a file called <code>htaccess</code>, and &#8220;catching&#8221; requests for <abbr title="Universal Resource Locator">URL</abbr>&#8216;s. It then checks these <abbr title="Universal Resource Locator">URL</abbr> request against a series of rules and conditions you have set. If the request meets any of the rules and conditions, it applies then necessary changes to the <abbr title="Universal Resource Locator">URL</abbr>, then reprocesses the request with the changes you have directed. Apache helpfully provides some <a href="http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html#rewritecond" title="Apache RewriteCond Directive" target="_blank" rel="nofollow">RewriteCond documentation</a></p>
<p>The most common mistake people make when thinking of <abbr title="Universal Resource Locator">URL</abbr> redirection with <code>mod_rewrite</code>, is they believe it creates something, or changes something. It doesn&#8217;t.</p>
<p>Here is a simple example, redirecting a page dependent upon its query string. The rewrite condition and rule looks like this:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteCond %{QUERY_STRING} ^id=([0-9]*)$
RewriteRule ^page\.php$ http://www.example.com/page/%1.php [R=302,L]</pre></div></div>

<p>The rewrite condition matches a numerical ID between 0 and 9. According to the official documentation, you would expect the following behaviour:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/page.php?id=1 -&gt; http://www.example.com/page/1.php
/page.php?id=10 -&gt; http://www.example.com/page/10.php</pre></div></div>

<p>However, if you don’t append something new, then <strong>the original query is passed through</strong> by default. This results in the following:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/page.php?id=1 -&gt; http://www.example.com/page/1.php?id=1
/page.php?id=10 -&gt; http://www.example.com/page/10.php?id=10</pre></div></div>

<p>If you want to discard the original query string you must append an empty question mark at the end of the rule; the <strong>query string not append</strong> or <strong>query string discard</strong> flag.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteCond %{QUERY_STRING} ^id=([0-9]*)$
RewriteRule ^page\.php$ http://www.example.com/page/%1.php? [R=302,L]</pre></div></div>

<p>Putting it all together, here&#8217;s a quick reference for dealing with query string in a RewriteRule.</p>
<p>Keep original query (i.e., the default behaviour)</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteRule ^page\.php$ /target.php [L]
# from http://www.example.com/page.php?foo=bar
# to http://www.example.com/target.php?foo=bar</pre></div></div>

<p>Discard original query</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteRule ^page\.php$ /target.php? [L]
# from http://www.example.com/page.php?foo=bar
# to http://www.example.com/target.php</pre></div></div>

<p>Replace original query</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteRule ^page\.php$ /target.php?bar=baz [L]
# from http://www.example.com/page.php?foo=bar
# to http://www.example.com/target.php?bar=foo</pre></div></div>

<p>Append new query to original query</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteRule ^page\.php$ /target.php?bar=baz [QSA,L]
# from http://www.example.com/page.php?foo=bar
# to http://www.example.com/target.php?foo=bar&amp;bar=foo</pre></div></div>

<p>Dave Child has created a great <a href="http://www.addedbytes.com/cheat-sheets/mod_rewrite-cheat-sheet/" title="mod_rewrite cheat sheet" target="_blank" rel="nofollow">mod_rewrite cheat sheet</a>; a one-page reference sheet, listing flags for the <code>RewriteRule</code> and <code>RewriteCond</code> directives, list of server variables, a regular expression guide and several examples of common rules.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/apache-rewriterule-and-query-strings/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Apache .htaccess query string redirects</title>
		<link>http://www.simonwhatley.co.uk/apache-htaccess-query-string-redirects</link>
		<comments>http://www.simonwhatley.co.uk/apache-htaccess-query-string-redirects#comments</comments>
		<pubDate>Thu, 17 Feb 2011 21:53:42 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[.htaccess]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache HTTP Server]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[SES]]></category>
		<category><![CDATA[url]]></category>
		<category><![CDATA[URL rewriting]]></category>
		<category><![CDATA[webserver]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3857</guid>
		<description><![CDATA[One of the most common tasks performed by Apache and htaccess is the manipulation of a URL and configuring a redirect for a specific page.]]></description>
			<content:encoded><![CDATA[<p>One of the most common tasks performed by Apache and <code>htaccess</code> is the manipulation of a <abbr title="Universal Resource Locator">URL</abbr> and configuring a redirect for a specific page. Creating a <strong>single page redirect</strong> in Apache is a simple task, which uses <code>mod_alias</code> module.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Redirect /page.php http://www.example.com/target.php</pre></div></div>

<p>More commonly, however, you&#8217;re likely to want to do a <strong>mass-redirection of pages</strong>. To accomplish this, you may use the <code>RedirectMatch</code> directive.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RedirectMatch ^/category/(.*)$ http://www.example.com/topic/$1</pre></div></div>

<p>This will redirect any page from the <code>category</code> folder to the corresponding one in <code>topic</code> folder with a convenient <strong>one-by-one redirect</strong>.</p>
<p>However, neither <code>Redirect</code> nor <code>RedirectMatch</code> allow you to specify a query string for the redirect source. In other words, the following statements are invalid and they&#8217;ll simply be ignored.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;"># single page redirect
Redirect /page.php?id=1  http://www.example.com/page/1
Redirect /page.php?id=10  http://www.example.com/page/10
&nbsp;
# multi-page redirect
RedirectMatch ^/page.php?id=([0-9]*)$  http://www.example.com/page/$1</pre></div></div>

<p>The solution requires a change of focus from Apache&#8217;s <code>mod_alias</code> module to the <code>mod_rewrite</code> module. Here’s an example.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteEngine On
RewriteCond %{REQUEST_URI}  ^/page\.php$
RewriteCond %{QUERY_STRING} ^id=([0-9]*)$
RewriteRule ^(.*)$ http://www.example.com/page/%1.php [L,R=301]</pre></div></div>

<p>The <code>mod_rewrite</code> module uses a rule-based rewriting engine (based on a regular-expression parser) to rewrite requested <abbr title="Universal Resource Locator">URL</abbr>s on the fly. It supports an unlimited number of rules and an unlimited number of attached rule conditions for each rule, to provide a really flexible and powerful <abbr title="Universal Resource Locator">URL</abbr> manipulation mechanism. The <abbr title="Universal Resource Locator">URL</abbr> manipulations can depend on various tests, of server variables, environment variables, <abbr title="HyperText Transfer Protocol">HTTP</abbr> headers, or time stamps.</p>
<p>So what does this all mean with respect to the above example?</p>
<p>The first line enables the <code>RewriteEngine</code> module. Note that <code>mod_rewrite</code> Apache module must be installed and enabled in order to use the <code>RewriteEngine</code>.</p>
<p>The <code>RewriteCond</code> statements set all the rewrite conditions. The fourth line, the real rewrite directive, will be executed <strong>if and only if all conditions are satisfied by the current request</strong>.</p>
<p>The first condition is for the page I need to redirect. This condition is included to prevent any unexpected errors if other pages are using the ID variable. Next, I base the rewrite rule on the value for the current request&#8217;s query string. The ID value within the regular expression is &#8220;wrapped&#8221; to be able to reuse the match later as a back-reference.</p>
<p>The final line is the rewrite rule. This line looks similar to the <code>RedirectMatch</code> statement. It specifies the redirection source, then the redirection target. The value captured by the second <code>RewriteCond</code> is referenced in the target with the <code>%N</code> keyword (in this example %1). The <code>RewriteRule</code> also includes a comma-separated list of flags that should be applied to the rule. In this case, <code>L</code> stops the rewriting process immediately whilst <code>R=301</code> specifies a permanent external redirect (301 is an <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html" title="HTTP Status Codes" target="_blank" rel="nofollow">HTTP Status Code</a>).</p>
<p><strong>Further reading:</strong></p>
<ul>
<li><a href="http://httpd.apache.org/docs/2.2/rewrite/" title="Apache URL rewriting guide" target="_blank" rel="nofollow">Apache URL rewriting guide</a></li>
<li><a href="http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html" title="Apache mod_rewrite" target="_blank" rel="nofollow">Apache mod_rewrite</a></li>
<li><a href="http://httpd.apache.org/docs/2.2/mod/mod_alias.html" title="Apache mod_alias" target="_blank" rel="nofollow">Apache mod_alias</a></li>
</ul>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/apache-htaccess-query-string-redirects/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apachectl Ulimit Error</title>
		<link>http://www.simonwhatley.co.uk/apachectl-ulimit-error</link>
		<comments>http://www.simonwhatley.co.uk/apachectl-ulimit-error#comments</comments>
		<pubDate>Tue, 15 Feb 2011 16:08:55 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Apache]]></category>
		<category><![CDATA[apachectl]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[OSX]]></category>
		<category><![CDATA[TextMate]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3820</guid>
		<description><![CDATA[Restarting Apache on my MacBook Pro today, using the command line argument sudo apachectl -k start resulted in a rather strange error]]></description>
			<content:encoded><![CDATA[<p>Restarting Apache on my MacBook Pro today, using the command line argument <code>sudo apachectl -k start</code> resulted in a rather strange error:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/usr/sbin/apachectl: line 82: ulimit: open files: cannot modify limit: Invalid argument</pre></div></div>

<p>After a little investigating it turned out to be caused by an update in the <code>apachectl</code> script to OSX 10.6.5. </p>
<p>The <code>ULIMIT_MAX_FILES</code> variable increases the maximum number of file descriptors allowed per child process. This is critical for configurations that use many file descriptors, such as mass vhosting, or a multithreaded server.</p>
<p>A quick edit of the the <code>apachectl</code> script and it&#8217;ll be back working.</p>
<p>I use TextMate, so the command is:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">sudo mate /usr/sbin/apachectl</pre></div></div>

<p>You&#8217;ll be prompted for your password.</p>
<p>Once the <code>apachectl</code> file is open, look for the following line (for me it was line 64):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">ULIMIT_MAX_FILES=&quot;ulimit -S -n `ulimit -H -n`&quot;</pre></div></div>

<p>and replace with the following:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">ULIMIT_MAX_FILES=&quot;ulimit -S -n&quot;</pre></div></div>

<p>This will set the correct command that increases the maximum number of file descriptors allowed per child process.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/apachectl-ulimit-error/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Secure Your WordPress Installation</title>
		<link>http://www.simonwhatley.co.uk/secure-your-wordpress-installation</link>
		<comments>http://www.simonwhatley.co.uk/secure-your-wordpress-installation#comments</comments>
		<pubDate>Wed, 11 Aug 2010 09:49:30 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[MySQL]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[secret key]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[SSL]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3731</guid>
		<description><![CDATA[Security is often an overlooked aspect of blogging, but a few minutes making sure things are secure can save you hours and hours of 'fixing' if someone decides to mess with your site.]]></description>
			<content:encoded><![CDATA[<p>Security is often an overlooked aspect of blogging, but a few minutes making sure things are secure can save you hours and hours of &#8216;fixing&#8217; if someone decides to mess with your site.</p>
<p>Here are some relatively simple steps that should help &#8216;toughen up&#8217; your WordPress installation:</p>
<h3>Don&#8217;t use the &#8220;admin&#8221; account.</h3>
<p>Either change the username via MySQL</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">UPDATE wp_users SET user_login = 'username' WHERE user_login = 'admin'</pre></div></div>

<p>*where &#8220;username&#8221; is whatever you want to call it.</p>
<p>Or, create a new/unique account with administrator privileges and delete the original admin account.</p>
<p>From WordPress 3.0 you can set the administrator username and password during the installation process, which is a good step forward.</p>
<h3>Use secure passwords.</h3>
<p>Use strong passwords to protect your website from dictionary attacks. WordPress will tell you when your password is strong (the admin interface for users has a password strength indicator).</p>
<p><a href="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2010/08/password-strength.png"><img src="http://www.simonwhatley.co.uk/blog/wp-content/uploads/2010/08/password-strength.png" alt="" title="WordPress Password Strength Meter" width="618" height="52" class="aligncenter size-full wp-image-3758" /></a></p>
<p>Don&#8217;t restrict your strong passwords to the WordPress installation, do the same for <abbr title="File Transfer Protocol">FTP</abbr>, <abbr title="Secure Shell">SSH</abbr> and MySQL as well.</p>
<h3>Update the folder permissions on your WordPress files.</h3>
<p>A good rule of thumb is to set the following permissions:</p>
<p>Files should be set to 644<br />
Folders should be set to 755</p>
<p>If these settings are too restrictive, i.e. you can&#8217;t upload files, change the permissions to increase the privileges (e.g. 775 or even 777).</p>
<p>Remember, permission levels vary depending on your specific server configuration, but you can generally set them to the desired level quite easily via <abbr title="File Transfer Protocol">FTP</abbr> or <abbr title="Secure Shell">SSH</abbr> clients.</p>
<p>For example, with SSH:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">find [your path] -type f -exec chmod 644 {} \;
find [your path] -type d -exec chmod 755 {} \;</pre></div></div>

<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Move the configuration file (wp-config.php).</h3>
<p>From WordPress 2.6 it became possible to move the configuration file up a directory and out of the WordPress root folder.</p>
<p>For example, if WordPress is located in the following directory:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">public_html/wordpress/wp-config.php</pre></div></div>

<p>You can move it to the following directory:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">public_html/wp-config.php</pre></div></div>

<p>WordPress automatically checks the parent directory if the configuration file is not found in your website&#8217;s root directory.</p>
<p>This makes it nearly impossible for anyone to access your configuration file as it now resides outside the website&#8217;s root directory.</p>
<h3>Move the wp-content directory.</h3>
<p>Like the configuration file, WordPress 2.6 added the ability to move the wp-content directory to another location.</p>
<p>Once moved, make two additions to the configuration file to identify the new location:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">define('WP_CONTENT_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content');
define('WP_CONTENT_URL','http://domain.com/blog/wp-content');</pre></div></div>

<p>You may also need to define the new location for plugins:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">define('WP_PLUGIN_DIR', $_SERVER['DOCUMENT_ROOT'] . '/blog/wp-content/plugins');
define('WP_PLUGIN_URL','http://domain.com/blog/wp-content/plugins');</pre></div></div>

<p>If hackers can&#8217;t find your wp-content folder&#8217;s location, clearly it becomes far more difficult for them to hack it.</p>
<h3>Stay current with all updates.</h3>
<p>The main WordPress installation files,  plugins and themes can be updated easily via the admin interface. Make sure you do so each time a new version of either are released.</p>
<p>For plugins, the plugin change log makes it easy to see what has changed and therefore ensure compatibility with your version of WordPress.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<h3>Remove the WordPress version information from your header.</h3>
<p>Viewing source on most WordPress websites will reveal what version of WordPress the website is running.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;meta name=&quot;generator&quot; content=&quot;WordPress 3.0.1&quot; /&gt;&lt;!-- leave this for stats --&gt;</pre></div></div>

<p>This helps hackers find vulnerable blogs or determine ways to hack a particular version.</p>
<p>To remove, find the code shown below in your header.php file and delete it:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">&lt;meta name=&quot;generator&quot; content=&quot;WordPress &lt;?php bloginfo('version'); ?&gt;&quot; /&gt;&lt;!-- leave this for stats --&gt;</pre></div></div>

<p>The wp_head function also includes the WordPress version in your header. To remove, include the following line of code in your theme&#8217;s functions.php file:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">remove_action('wp_head','wp_generator');</pre></div></div>

<h3>Use secret keys.</h3>
<p>A secret key is a hashing salt, which makes your website harder to hack by adding random elements to the password. These secret keys are found in the WordPress configuration (wp-config.php) file.</p>
<p>Visit the following URL to get the secret keys: <a href="https://api.wordpress.org/secret-key/1.1/salt/" title="WordPress secret key generator" target="_blank" rel="nofollow">https://api.wordpress.org/secret-key/1.1/salt/</a></p>
<p>Replace the following in the configuration file</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">define('AUTH_KEY','put your unique phrase here');
define('SECURE_AUTH_KEY','put your unique phrase here');
define('LOGGED_IN_KEY','put your unique phrase here');
define('NONCE_KEY','put your unique phrase here');
define('AUTH_SALT','put your unique phrase here');
define('SECURE_AUTH_SALT','put your unique phrase here');
define('LOGGED_IN_SALT','put your unique phrase here');
define('NONCE_SALT','put your unique phrase here');</pre></div></div>

<p>With the generated keys (example only):</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">define('AUTH_KEY','*QCT0a,T+3hxeg)ti7k}#~&lt;AQSmm&amp;x+ff=*$d:)&lt;-;+!a?yS{ArmuR-#*GyLCgI)');
define('SECURE_AUTH_KEY','[)|y._i~B5js,h3@4%M[&lt;l:DJ&amp;]Ou$2|n(e?DJ`+R4pk6um/6zS%6@@i{^N-6(4]');
define('LOGGED_IN_KEY','@+l2X{3wvy/1K[zRm|P_r;WixJ:,&gt;V&amp;JL![gyJq ?b[Wf.W|U_MKutdrL*$l][-S');
define('NONCE_KEY','T$R&gt;#*2)2kO?NIr&amp;o|&gt;[L&gt;T5%YGd^yJ+eE$7wkcL-?1v]-X*{f`Pg)NZqKU}^e8R');
define('AUTH_SALT','&lt;8JD%+O!t.F%]6RaO9L_MI&lt;w2Lw_-Bc5u_(WDdPoO0D;j9zwu*?1i{%nH/RBjF6J');
define('SECURE_AUTH_SALT','oS|EP&amp;Pm`bf8iG!C&lt;X8#yFG%8J)x G+3M`wRBtp#]7)&amp;hj}ZV/p&gt; yh-BtbBRbTk');
define('LOGGED_IN_SALT','tW4|J/m|habEJ+BTvF0PfpuiOgf-6,dIav-5K|FTM$&amp;Agy;FqDjp|5Ci7&gt;nJFD/#');
define('NONCE_SALT','T-v&amp;f++w!c%5zs2t8qH?,n,/WE&amp;uWd--o4t{FL49/4e~|e+HV+.~A?JYZ1Ev&lt;5)u');</pre></div></div>

<p>You can add or amend the secret keys at anytime. This will invalidate all existing cookies and require users to login again.</p>
<h3>Change the WordPress table prefix.</h3>
<p>You can define the WordPress database table prefix in the WordPress configuration file. By default, the prefix is set to:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">$table_prefix = 'wp_';</pre></div></div>

<p>Change this to whatever you prefer.</p>
<p>If you already have a version of WordPress installed, you will need to manually amend the database table names in MySQL, or do a clean install and data import.</p>
<h3>Force <abbr title="Secure Sockets Layer">SSL</abbr> on login and admin access.</h3>
<p>Set the following option in the WordPress configuration file to force <abbr title="Secure Sockets Layer">SSL</abbr> (<abbr title="Secure HyperText Transfer Protocol">HTTPS</abbr>) on the login and admin screens.</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">define('FORCE_SSL_LOGIN',true);
define('FORCE_SSL_ADMIN',true);</pre></div></div>

<h3>Use <abbr title="Internet Protocol">IP</abbr> lockdown on the wp-admin directory.</h3>
<p>Create an <code>.htaccess</code> file in your wp-admin directory with the following lines of code:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">AuthUserFile /dev/null
AuthGroupFile /dev/null
AuthName &quot;Access Control&quot;
AuthType Basic
order deny, allow
deny from all
#IP whitelist
allow from 72.14.207.99
allow from 216.239.51.99</pre></div></div>

<p>Where the <abbr title="Internet Protocol">IP</abbr> address lines are whatever your chosen <abbr title="Internet Protocol">IP</abbr> addresses are. Only users with these <abbr title="Internet Protocol">IP</abbr> addresses will have access to the wp-admin folder and hence the admin part of the blog.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p><strong>Resources:</strong></p>
<ul>
<li><a href="http://codex.wordpress.org/Hardening_WordPress" title="WordPress Codex: Hardening WordPress" target="_blank" rel="nofollow">http://codex.wordpress.org/Hardening_WordPress</a></li>
<li><a href="http://codex.wordpress.org/Changing_File_Permissions" title="WordPress Codex: Changing File Permissions" target="_blank" rel="nofollow">http://codex.wordpress.org/Changing_File_Permissions</a></li>
<li><a href="http://codex.wordpress.org/Editing_wp-config.php" title="WordPress Codex: Editing the WordPress Configuration File" target="_blank" rel="nofollow">http://codex.wordpress.org/Editing_wp-config.php</a></li>
<li><a href="http://codex.wordpress.org/htaccess_for_subdirectories" title="WordPress Codex: Htaccess for Subdirectories" target="_blank" rel="nofollow">http://codex.wordpress.org/htaccess_for_subdirectories</a></li>
</ul>
<p>If you have any more suggestions, that don&#8217;t necessitate plugins, feel free to comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/secure-your-wordpress-installation/feed</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Using Google-Hosted JavaScript Libraries with WordPress</title>
		<link>http://www.simonwhatley.co.uk/using-google-hosted-javascript-libraries-with-wordpress</link>
		<comments>http://www.simonwhatley.co.uk/using-google-hosted-javascript-libraries-with-wordpress#comments</comments>
		<pubDate>Tue, 13 Apr 2010 15:00:19 +0000</pubDate>
		<dc:creator>Simon</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[jquery]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://www.simonwhatley.co.uk/?p=3474</guid>
		<description><![CDATA[With the announcement that Google will be including page loading times as part of it’s SERPs ranking algorithm, it has become increasingly important to optimise your use of 3rd-party libraries such as jQuery.]]></description>
			<content:encoded><![CDATA[<p>With the announcement that Google will be including page loading times as part of it&#8217;s <abbr title="Search Engine Results Pages">SERP</abbr>s ranking algorithm, it has become increasingly important to optimise your use of 3rd-party libraries such as <a href="http://jquery.com" title="jQuery JavaScript Library" target="_blank" rel="nofollow">jQuery</a>.</p>
<p>If you want &#8212; and this is the default setting for WordPress, themes and plugins &#8212; you can just download jQuery, put it on your server and link to it from your <code>header.php</code> file in the <code>&lt;head&gt;</code> section.</p>
<p>However, it is better to use the proper <code>wp_register_script()</code> function, which can be achieved in your <code>functions.php</code> file:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span> <span style="color: #339933;">!</span>is_admin<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
   wp_deregister_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
   wp_register_script<span style="color: #009900;">&#40;</span>
   	<span style="color: #0000ff;">'jquery'</span><span style="color: #339933;">,</span>
   	<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span>
   	<span style="color: #009900; font-weight: bold;">false</span><span style="color: #339933;">,</span>
   	<span style="color: #0000ff;">'1.4.2'</span>
   <span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> 
   wp_enqueue_script<span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'jquery'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>The reason we use the <code>wp_register_script()</code> is to ensure that WordPress and its themes and plugins are aware that the script has been loaded and therefore not to load an additional copy.</p>
<p>I have also used the <code>is_admin()</code> function to prevent conflict and therefore errors, in the WordPress administrator.</p>
<p>Of course, this method is not only restricted to jQuery, you can do the same for other popular JavaScript frameworks such as <a href="http://ajax.googleapis.com/ajax/libs/mootools/1.2.4/mootools-yui-compressed.js" title="Google-hosted Mootools">Mootools</a>.</p>
<p><script type="text/javascript"><!--
google_ad_client = "pub-6475233631580417";
/* 468x60 Basic */
google_ad_slot = "7117418273";
google_ad_width = 468;
google_ad_height = 60;
//-->
</script>
<script type="text/javascript"
src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script></p>
<p>Further information on the wp_enqueue_script can be found on the <a href="http://codex.wordpress.org/Function_Reference/wp_enqueue_script" title="WordPress Codex - Function Reference/wp enqueue script" target="_blank" rel="nofollow">WordPress Codex</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.simonwhatley.co.uk/using-google-hosted-javascript-libraries-with-wordpress/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

