<?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>Laws Hosting&#039;s Blog</title>
	<atom:link href="http://blog.laws-hosting.co.uk/index.php/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.laws-hosting.co.uk</link>
	<description>The Solution For You!</description>
	<lastBuildDate>Sun, 22 Aug 2010 23:14:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>12 characters safer with modern PCs</title>
		<link>http://blog.laws-hosting.co.uk/index.php/2010/08/23/12-characters-safer-with-modern-pcs/</link>
		<comments>http://blog.laws-hosting.co.uk/index.php/2010/08/23/12-characters-safer-with-modern-pcs/#comments</comments>
		<pubDate>Sun, 22 Aug 2010 23:14:08 +0000</pubDate>
		<dc:creator>Peter Laws</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Non-Hosting]]></category>

		<guid isPermaLink="false">http://blog.laws-hosting.co.uk/?p=102</guid>
		<description><![CDATA[Everyone  seems to have to more passwords than close friends these days and the combinations of numbers and letters are already difficult to remember but now experts at the Georgia Tech Research Institute are suggesting anything less than 12 characters could be quickly cracked. The issue is the additional computing now on offer, in particular the processing power of the chips now the norm on graphics cards. The researchers have discovered that the number-crunching power of modern graphics cards could offer a new way of cracking passwords, with their power on par with multi-million dollar supercomputers built just a decade ago. The research found seven character passwords ‘hopelessly inaccurate’ and with processing power increasing year on year, a combination of upper-case, lower-case, numerals and symbols in a 12 character password offered better protection. Do you think passwords are becoming an unsafe security measure?]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.laws-hosting.co.uk/wp-content/uploads/2010/08/safe-img.jpg"><img class="alignleft size-full wp-image-103" title="safe-img" src="http://blog.laws-hosting.co.uk/wp-content/uploads/2010/08/safe-img.jpg" alt="" width="115" height="115" /></a>Everyone  seems to have to more passwords than close friends these days and the  combinations of numbers and letters are already difficult to remember  but now experts at the <a href="http://www.gtri.gatech.edu/" target="_blank">Georgia Tech Research Institute</a> are suggesting  anything less than 12 characters could be quickly cracked.</p>
<p>The issue is the additional computing now on offer, in particular the  processing power of the chips now the norm on graphics cards.</p>
<p>The <a href="http://www.gtri.gatech.edu/casestudy/Teraflop-Troubles-Power-Graphics-Processing-Units-GPUs-Password-Security-System" target="_blank">researchers </a>have discovered that the  number-crunching power of modern graphics cards could offer a new way of  cracking passwords, with their power on par with multi-million dollar  supercomputers built just a decade ago.</p>
<p>The research found seven character passwords ‘hopelessly inaccurate’  and with processing power increasing year on year, a combination of  upper-case, lower-case, numerals and symbols in a 12 character password  offered better protection.</p>
<p><em>Do you think passwords are becoming an unsafe security measure? </em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.laws-hosting.co.uk/index.php/2010/08/23/12-characters-safer-with-modern-pcs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Keep your phpMyAdmin installations up to date!</title>
		<link>http://blog.laws-hosting.co.uk/index.php/2010/08/12/keep-your-phpmyadmin-installations-up-to-date/</link>
		<comments>http://blog.laws-hosting.co.uk/index.php/2010/08/12/keep-your-phpmyadmin-installations-up-to-date/#comments</comments>
		<pubDate>Thu, 12 Aug 2010 12:22:49 +0000</pubDate>
		<dc:creator>Peter Laws</dc:creator>
				<category><![CDATA[Security Issues]]></category>
		<category><![CDATA[brute force]]></category>
		<category><![CDATA[hack]]></category>
		<category><![CDATA[phpmyadmin]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[shh]]></category>
		<category><![CDATA[tmp]]></category>

		<guid isPermaLink="false">http://blog.laws-hosting.co.uk/?p=99</guid>
		<description><![CDATA[There is a hack in phpMyAdmin, we have seen various blogs and hosts in panic, thankfully Laws Hosting wasn&#8217;t affected as we take extra measures in the way we install phpMyAdmin on our servers. What we heard is that the systems acted totally normal, except for the fact that it ran ssh brute force attacks against several randomly chosen remote servers. So what happened? The attacker used a vulnerability in phpMyAdmin, which once had been installed, used one or two times, and then forgotten (version 2.10.xx or so..). Sadly enough, whoever installed phpMyAdmin did not remove the setup.php file (which you are encouraged to do in the readme). This setup.php was the attackers starting point. He/she injected a ssh client running as root in /tmp/dd_ssh that started about 100 child processes. The cleanup was as follows: Removed phpMyAdmin Removed all suspicious files in /tmp Restarted the network interfaces Changed all user passwords Installed fail2ban Changed /tmp to be non-executable Suggestions for today: Keep your phpMyAdmin up to date Search for installations on all your servers NOW! Do NOT install in a folder named “phpmyadmin”, “sqladmin” or similar. Use a non-guessable name. Protect it at least using htaccess Last but not [...]]]></description>
			<content:encoded><![CDATA[<p>There is a hack in phpMyAdmin, we have seen various blogs and hosts in panic, thankfully Laws Hosting wasn&#8217;t affected as we take extra measures in the way we install phpMyAdmin on our servers.</p>
<p>What we heard is that the systems acted totally normal, except for the fact that it ran  ssh brute force attacks against several randomly chosen remote servers.  So what happened?</p>
<p>The attacker used a vulnerability in phpMyAdmin, which once had been  installed, used one or two times, and then forgotten (version 2.10.xx or  so..). Sadly enough, whoever installed phpMyAdmin did not remove the  setup.php  file (which you are encouraged to do in the readme). This  setup.php was the attackers starting point. He/she injected a ssh client  running as root in /tmp/dd_ssh that started about 100 child processes.</p>
<p>The cleanup was as follows:</p>
<ul>
<li>Removed phpMyAdmin</li>
<li>Removed all suspicious files in /tmp</li>
<li>Restarted the network interfaces</li>
<li>Changed all user passwords</li>
<li>Installed fail2ban</li>
<li>Changed /tmp to be non-executable</li>
</ul>
<p>Suggestions for today:</p>
<ul>
<li>Keep your phpMyAdmin up to date</li>
<li>Search for installations on all your servers NOW!</li>
<li>Do NOT install in a folder named “phpmyadmin”, “sqladmin” or  similar. Use a non-guessable name.</li>
<li>Protect it at least using htaccess</li>
<li>Last but not least: if you can access your server via ssh, there’s  no need for phpMyAdmin. Setup a ssh tunnel, use your favourite mySQL  GUI, and bingo, you’re safe.</li>
</ul>
<p>We advise our clients not to install their own phpMyAdmin on their domains, and just use our versions that we supply.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.laws-hosting.co.uk/index.php/2010/08/12/keep-your-phpmyadmin-installations-up-to-date/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New .co, .net.co, .com.co domains</title>
		<link>http://blog.laws-hosting.co.uk/index.php/2010/07/29/new-co-net-co-com-co-domains/</link>
		<comments>http://blog.laws-hosting.co.uk/index.php/2010/07/29/new-co-net-co-com-co-domains/#comments</comments>
		<pubDate>Thu, 29 Jul 2010 18:22:56 +0000</pubDate>
		<dc:creator>Peter Laws</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://blog.laws-hosting.co.uk/?p=95</guid>
		<description><![CDATA[The .co domain has arrived! Colossal new domain extension .co has just become available. The country code for Colombia, .co is also a great choice for company, commerce or community websites. Demand for .co domains is sky high, but hopefully your preferred name is still available for registration. So don&#8217;t hang about, secure your .co – before someone else does. Find your .co domain name now &#62;]]></description>
			<content:encoded><![CDATA[<p><strong>The .co domain has arrived!</strong></p>
<p>Colossal new domain extension <strong>.co</strong> has just become available. The country code for Colombia, <strong>.co</strong> is also a great choice for <strong>co</strong>mpany, <strong>co</strong>mmerce or <strong>co</strong>mmunity websites.</p>
<p>Demand for <strong>.co</strong> domains is sky high, but hopefully your preferred name is still available for registration. So don&#8217;t hang about, secure your <strong>.co</strong> – before someone else does.</p>
<p><a href="http://www.laws-hosting.co.uk/domains.php"><span style="color: #d80049;">Find your <strong>.co</strong> domain name now &gt;</span></a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.laws-hosting.co.uk/index.php/2010/07/29/new-co-net-co-com-co-domains/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>mod_rewrite: A Beginner&#8217;s Guide to URL Rewriting</title>
		<link>http://blog.laws-hosting.co.uk/index.php/2010/07/24/mod_rewrite-a-beginners-guide-to-url-rewriting/</link>
		<comments>http://blog.laws-hosting.co.uk/index.php/2010/07/24/mod_rewrite-a-beginners-guide-to-url-rewriting/#comments</comments>
		<pubDate>Sat, 24 Jul 2010 00:26:51 +0000</pubDate>
		<dc:creator>Peter Laws</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[Search Engines]]></category>
		<category><![CDATA[Tips & Tutorials]]></category>
		<category><![CDATA[mod_rewrite]]></category>

		<guid isPermaLink="false">http://blog.laws-hosting.co.uk/?p=92</guid>
		<description><![CDATA[So you&#8217;re a Web developer who has all the bells and whistles on your site, creates Web-based applications that are both beautiful and work well. But what about these issues? Applications Must Be Safe A user must not be able to harm your site in any way by modifying a URL that points to your applications. In order to ensure your site&#8217;s safe, check all the GET variables coming from your visitors (We think it&#8217;s trivial to mention that the POST variables are a must to examine). For example, imagine we have a simple script that shows all the products in a category.o Generally, it&#8217;s called like this: app.php?target=showproducts&#38;categoryid=123 But what will this application do if ScriptKiddie(tm) comes and types this in his browser: app.php?target=showproducts&#38;categoryid=youarebeinghacked Well, many of the sites I&#8217;ve seen will drop some error message complaining about use of the wrong SQL query, invalid MySQL resource ID, and so on&#8230; These sites are not secure. And can anyone guarantee that a site-to-be-finished-yesterday will have all the parameter verifications &#8211;even in a programmer group having only 2 or 3 people? Applications Must Be Search-Engine Friendly It&#8217;s not generally known, but many of the search engines will not index your [...]]]></description>
			<content:encoded><![CDATA[<p><strong>So you&#8217;re a Web developer who has all the bells and whistles  on your site, creates Web-based applications that are both beautiful and  work well. But what about these issues?</strong></p>
<h5>Applications Must Be Safe</h5>
<p>A user must not be able to harm your site in any way by modifying a  URL that points to your applications. In order to ensure your site&#8217;s  safe, check all the GET variables coming from your visitors (We think  it&#8217;s trivial to mention that the POST variables are a must to examine).</p>
<p>For example, imagine we have a simple script that shows all the  products in a category.o Generally, it&#8217;s called like this:</p>
<p><code>app.php?target=showproducts&amp;categoryid=123</code></p>
<p>But what will this application do if ScriptKiddie(tm) comes and types  this in his browser:</p>
<p><code>app.php?target=showproducts&amp;categoryid=youarebeinghacked</code></p>
<p>Well, many of the sites I&#8217;ve seen will drop some error message  complaining about use of the wrong SQL query, invalid MySQL resource ID,  and so on&#8230; These sites are not secure. And can anyone guarantee that a  site-to-be-finished-yesterday will have all the parameter verifications  &#8211;even in a programmer group having only 2 or 3 people?</p>
<p><em><strong>Applications Must Be Search-Engine Friendly</strong></em></p>
<p>It&#8217;s not generally known, but many of the search engines will not  index your site in depth if it contains links to dynamic pages like the  one mentioned above. They simply take the &#8220;name&#8221; part of the URL (that&#8217;s  everything before the question mark, which contains the parameters that  are needed for most of the scripts to run correctly), and then try to  fetch the contents of the page. To make it clear, here are some links  from our fictitious page:</p>
<p><code>app.php?target=showproducts&amp;categoryid=123<br />
app.php?target=showproducts&amp;categoryid=124<br />
app.php?target=showproducts&amp;categoryid=125</code></p>
<p>Unfortunately, there&#8217;s a big chance that some of the search engines  will try to download the following page:</p>
<p><code>app.php</code></p>
<p>In most cases calling a script like this causes an error &#8211; but if  not, I&#8217;m sure it will not show the proper contents the link was pointing  to. Just try this search at google.com:</p>
<p><q>&#8220;you have an error in your sql syntax&#8221; .php -forum</q></p>
<p>There are both huge bugs and security in the scripts listed &#8212; again,  these scripts are not search-engine friendly.</p>
<p><em><strong>Applications must be user-friendly </strong></em></p>
<p>If you application uses links like:</p>
<p><code>http://www.down.com/?category=34769845698752354</code></p>
<div id="adz"><script type="text/javascript">// < ![CDATA[
// < ![CDATA[
GA_googleFillSlot("Articles_6_300x250");
// ]]&gt;</script><script src="http://pubads.g.doubleclick.net/gampad/ads?correlator=1279929900461&amp;output=json_html&amp;callback=GA_googleSetAdContentsBySlotForSync&amp;impl=s&amp;a2ids=Bebrg&amp;cids=SwsA24&amp;pstok=e1ezx1ICDCIKDgoKCK63XhDuhrDhEhAA&amp;client=ca-pub-9603645151104616&amp;slotname=Articles_6_300x250&amp;page_slots=Articles_5_728x90%2CArticles_6_300x250&amp;cookie=ID%3D4028406b0312547a%3AT%3D1273961422%3AS%3DALNI_MaudDcimT2WiAeYqhXRzZShDqrkEg&amp;ga_vid=1038589996.1279929902&amp;ga_sid=1279929902&amp;ga_hid=1512061679&amp;url=http%3A%2F%2Farticles.sitepoint.com%2Farticle%2Fguide-url-rewriting&amp;ref=http%3A%2F%2Fwww.google.com%2Fsearch%3Fnum%3D100%26hl%3Den%26safe%3Doff%26rlz%3D1B3GGGL_en-GBGB313GB313%26q%3Dmod_rewrite%2B%26aq%3Df%26aqi%3Dg10%26aql%3D%26oq%3D%26gs_rfai%3D&amp;lmt=1279929900&amp;dt=1279929901994&amp;cc=100&amp;biw=1008&amp;bih=541&amp;ifi=2&amp;adk=2986466219&amp;u_tz=60&amp;u_his=50&amp;u_java=true&amp;u_h=768&amp;u_w=1024&amp;u_ah=740&amp;u_aw=1024&amp;u_cd=24&amp;u_nplug=36&amp;u_nmime=140&amp;flash=10.1.53"></script><br />
 </p>
<div id="google_ads_div_Articles_6_300x250"><ins></ins><ins></ins></div>
<p><script type="text/javascript">// < ![CDATA[
// < ![CDATA[
GA_googleCreateDomIframe('google_ads_div_Articles_6_300x250' ,'Articles_6_300x250');
// ]]&gt;</script></p>
</div>
<p>then most of your visitors will find it difficult to get back to  their favourite category (eg. Nettools/Messengers) every time they start  from the main page of your site. Instead, they&#8217;d like to see URLs like  this:</p>
<p><code>http://www.down.com/Nettools/Messengers</code></p>
<p>It&#8217;s even easier for the user to find (pick) the URL from the  browsers&#8217; drop-down list as they type into the Location field (though of  course this only works if the user has visited that previously).</p>
<p><em><strong>And what about you?</strong></em></p>
<p>Now you have everything you need to answer the following questions:</p>
<ul>
<li>Is your site really safe enough?</li>
<li>Can you protect your site from hackers?</li>
<li>Are your Websites search-engine compatible?</li>
<li>Are the URLs on your site &#8216;user friendly&#8217; &#8211; are they easy to  remember? &#8230;and would you like it to be?</li>
</ul>
<h5>What is the mod_rewrite Solution,  Exactly?</h5>
<p>But what does it exactly do? Hey! Here comes the whole point of this  article!</p>
<p>mod_rewrite catches URLs that meet specific conditions, and rewrites  them as it was told to.</p>
<p>For example, you can have a non-existing</p>
<p><code>http://www.mysite.co.uk/anything</code></p>
<p>URL that is rewritten to:</p>
<p>http://www.mysite.com/deep/stuff/very_complicated_url?text=</p>
<p><code>having_lots_of_extra_characters</code></p>
<div id="adz"><script type="text/javascript">// < ![CDATA[
// < ![CDATA[
GA_googleFillSlot("Articles_6_300x250");
// ]]&gt;</script><script src="http://pubads.g.doubleclick.net/gampad/ads?correlator=1279930300619&amp;output=json_html&amp;callback=GA_googleSetAdContentsBySlotForSync&amp;impl=s&amp;a2ids=Bebrg&amp;cids=SwsA24&amp;pstok=e1ezx1ICDCIKDgoKCK63XhDuhrDhEhAA&amp;client=ca-pub-9603645151104616&amp;slotname=Articles_6_300x250&amp;page_slots=Articles_5_728x90%2CArticles_6_300x250&amp;cookie=ID%3D4028406b0312547a%3AT%3D1273961422%3AS%3DALNI_MaudDcimT2WiAeYqhXRzZShDqrkEg&amp;ga_vid=686423261.1279930301&amp;ga_sid=1279930301&amp;ga_hid=458397169&amp;url=http%3A%2F%2Farticles.sitepoint.com%2Farticle%2Fguide-url-rewriting%2F2&amp;ref=http%3A%2F%2Farticles.sitepoint.com%2Farticle%2Fguide-url-rewriting&amp;lmt=1279930300&amp;dt=1279930300947&amp;cc=100&amp;biw=1008&amp;bih=541&amp;ifi=2&amp;adk=2986466219&amp;u_tz=60&amp;u_his=50&amp;u_java=true&amp;u_h=768&amp;u_w=1024&amp;u_ah=740&amp;u_aw=1024&amp;u_cd=24&amp;u_nplug=36&amp;u_nmime=140&amp;flash=10.1.53"></script><br />
 </p>
<div id="google_ads_div_Articles_6_300x250"><ins></ins><ins></ins></div>
<p><script type="text/javascript">// < ![CDATA[
// < ![CDATA[
GA_googleCreateDomIframe('google_ads_div_Articles_6_300x250' ,'Articles_6_300x250');
// ]]&gt;</script></p>
</div>
<p>Did you expect something more? Be patient&#8230;</p>
<p><code>&lt;IfModule mod_rewrite.c&gt;<br />
RewriteEngine on<br />
RewriteRule ^/shortcut$ /complicated/and/way/too/long/url/here<br />
&lt;/IfModule&gt;</code></p>
<p>Of course this, too, should go into the .htaccessttpd.conf file.</p>
<p>After you restart Apache (you&#8217;ll get used to it soon!) you can type  this into your browser:</p>
<p><code>http://mysite.co.uk/shortcut</code></p>
<p>If there&#8217;s a directory structure <code>/complicated/and/way/too/long/url/here</code> existing in your document root, you&#8217;re going to be &#8220;redirected&#8221; there,  where you&#8217;ll see the contents of this directory (eg, the directory  listing, index.html, whatever there is).</p>
<p>To understand mod_rewrite better, it&#8217;s important to know that this is  not true redirection. &#8220;Classic&#8221; redirection is done with the Location:  header of the HTTP protocol, and tells the browser itself to go to  another URL. There are numerous ways to do this, for example, in PHP you  could write:</p>
<p><code>&lt;?<br />
// this PHP file is located at http://localhost/shortcut/index.php<br />
header<br />
("Location: /complicated/and/way/too/long/url/here");<br />
?&gt;</code></p>
<p>This code shows the same page by sending a HTTP header back to the  browser. That header tells the browser to move to another URL location  instantly. But, what mod_rewrite does is totally different: it &#8216;tricks&#8217;  the browser, and serves the page as if it were really there &#8211; that&#8217;s why  this is an URL rewriter and not a simple redirector (you can even  verify the HTTP headers sent and received to understand the difference).</p>
<p>But it&#8217;s not just shortening paths that makes mod_rewrite the &#8220;Swiss  Army Knife of URL manipulation&#8221;&#8230;</p>
<h5>Rules</h5>
<p>You&#8217;ve just seen how to specify a really simple RewriteRule. Now  let&#8217;s take a closer look&#8230;</p>
<p><code>RewriteRule Pattern Substitution [Flag(s)]</code></p>
<p><code>RewriteRule</code> is a simple instruction that tells  mod_rewrite what to do. The magic is that you can use regular  expressions in the Pattern and references in the Substitution strings.  What do you think of the following rule?</p>
<p><code>RewriteRule /products/([0-9]+) /siteengine/products.php?id=$1</code></p>
<p>Now you can use the following syntax in your URLs:</p>
<p><code>http://mysite.co.uk/products/123</code></p>
<p>After restarting Apache, you&#8217;ll find this is translated as:</p>
<p><code>http://mysite.co.uk/siteengine/products.php?id=123</code></p>
<p>If you use only &#8216;fancy&#8217; URLs in your scripts, there will be no way  for your visitor to find out where your script resides (<code>/siteengine</code> in the example), what its name is (products.php), or what the name of  the parameter to pass (<code>productid</code>) is! Do you like it? We&#8217;ve  just completed two of our tasks, look!</p>
<ul>
<li><strong>Search-engine compatibility:</strong> there are no fancy  characters in the URL, so the engines will explore your whole site</li>
<li><strong>Security:</strong> ScriptKiddie(tm)-modified URLs will  cause no error, as they&#8217;re verified with the regular expression first to  be a number &#8211; URLs with no proper syntax can&#8217;t even reach the script  itself.</li>
</ul>
<p>Of course, you can create more complex RewriteRules. For example,  here&#8217;s a set of rules:</p>
<p><code> RewriteRule ^/products$ /content.php<br />
RewriteRule ^/products/([0-9]+)$ /content.php?id=$1<br />
RewriteRule<br />
^/products/([0-9]+),([ad]*),([0-9]{0,3}),([0-9]*),([0-9]*$)<br />
/marso/content.php?id=$1&amp;sort=$2&amp;order=$3&amp;start=$4</code></p>
<p>Thanks to these rules we can use the followings links in the  application:</p>
<ul>
<li>Show an opening page that contains product categories:  <code>http://somesite.co.uk/products </code></li>
<li>Product listing, categoryid is 123, page 1 (as default), default  order:  <code>http://somesite.co.uk/products/123   http://somesite.co.uk/products/123,,,, </code></li>
<li>Product listing, categoryid is 123, page 2, descending order by  third field (d for descending, 3 for third field):  <code>http://somesite.hu/products/123,d,3,2</code></li>
</ul>
<p>This is also an example of the use of multiple <code>RewriteRules</code>.  When there&#8217;s a <code>RegExp</code> match, the proper substitution  occurs, mod_rewrite stops running and Apache serves the page with the  substituted URL. Should there be no match (after processing all the  rules), a usual 404 page comes up. And of course you can also define one  or more rules (eg. <code>^.*$</code> as last pattern) to specify which  script(s) to run depending on the mistaken URL.</p>
<p>The third, optional part of <code>RewriteRule</code> is:</p>
<p><code>RewriteRule Pattern Substitution Flag(s)</code></p>
<p>With flags, you can send specific headers to the browser when the URL  matches the pattern, such as:</p>
<ul>
<li>&#8216;<code>forbidden</code>&#8216; or &#8216;<code>f</code>&#8216; for 403 forbidden,</li>
<li>&#8216;<code>gone</code>&#8216; or &#8216;<code>g</code>&#8216; for 410 gone,</li>
<li>you may also force redirection, or force a MIME-type.</li>
</ul>
<p>You can even use the:</p>
<ul>
<li>&#8216;<code>nocase</code>&#8216; or &#8216;<code>NC</code>&#8216; flag to make the pattern  case-insensitive</li>
<li>&#8216;<code>next</code>&#8216;<code>/N</code>&#8216; to loop back to the first rule  (&#8216;<code>next round</code>&#8216; &#8212; though this may result in an endless loop,  be careful with it!)</li>
<li>&#8216;<code>skip=N</code>&#8216;<code>/'S=N</code>&#8216; to skip the following N  rules</li>
</ul>
<p>&#8230;and so on.</p>
<p>We hope you feel like we&#8217;ve felt while playing around with this module for  the first time!</p>
<h5>Conditions</h5>
<p>But that&#8217;s not all! Though <code>RewriteRule</code> gives you an  opportunity to have professional URL rewriting, you can make it more  customized using conditions.</p>
<p>The format of the conditions is simple:</p>
<div id="adz"><script type="text/javascript">// < ![CDATA[
// < ![CDATA[
GA_googleFillSlot("Articles_6_300x250");
// ]]&gt;</script><script src="http://pubads.g.doubleclick.net/gampad/ads?correlator=1279930667404&amp;output=json_html&amp;callback=GA_googleSetAdContentsBySlotForSync&amp;impl=s&amp;a2ids=BdJpg&amp;cids=StmYk4&amp;pstok=vKyZ1iXst7sKDgoKCKaTXRDOxJnbEhAA&amp;client=ca-pub-9603645151104616&amp;slotname=Articles_6_300x250&amp;page_slots=Articles_5_728x90%2CArticles_6_300x250&amp;cookie=ID%3D4028406b0312547a%3AT%3D1273961422%3AS%3DALNI_MaudDcimT2WiAeYqhXRzZShDqrkEg&amp;ga_vid=277317913.1279930667&amp;ga_sid=1279930667&amp;ga_hid=819437181&amp;url=http%3A%2F%2Farticles.sitepoint.com%2Farticle%2Fguide-url-rewriting%2F3&amp;ref=http%3A%2F%2Farticles.sitepoint.com%2Farticle%2Fguide-url-rewriting%2F2&amp;lmt=1279930667&amp;dt=1279930667684&amp;cc=100&amp;biw=1008&amp;bih=541&amp;ifi=2&amp;adk=2986466219&amp;u_tz=60&amp;u_his=50&amp;u_java=true&amp;u_h=768&amp;u_w=1024&amp;u_ah=740&amp;u_aw=1024&amp;u_cd=24&amp;u_nplug=36&amp;u_nmime=140&amp;flash=10.1.53"></script><br />
 </p>
<div id="google_ads_div_Articles_6_300x250"><ins></ins><ins></ins></div>
<p><script type="text/javascript">// < ![CDATA[
// < ![CDATA[
GA_googleCreateDomIframe('google_ads_div_Articles_6_300x250' ,'Articles_6_300x250');
// ]]&gt;</script></p>
</div>
<p><code>RewriteCond Something_to_test Condition</code></p>
<p>Any <code>RewriteCond</code> condition affects the behaviour of the  following <code>RewriteRule</code>, which is a little confusing, as <code>RewriteCond</code> won&#8217;t be evaluated until the following <code>RewriteRule</code> pattern  matches the current URL.</p>
<p>It works like this: mod_rewrite takes all the <code>RewriteRules</code> and starts matching the current URL against each <code>RewriteRule</code> pattern. If there&#8217;s a <code>RewriteRule</code> pattern that matches the  URL, mod_rewrite checks if there are existing conditions for this <code>RewriteRule</code>,  and if the first one returns true. If it does, the proper substitution  will occur, but if not, mod_rewrite looks for remaining conditions. When  there are no more conditions, the subsequent <code>RewriteRule</code> is checked.</p>
<p>This way you can customize URL rewriting using conditions based on  practically everything that&#8217;s known during a HTTP transfer in Apache &#8212;  and a lot more! Basically you can use all of these variables in the <code>Something_to_test</code> string:</p>
<ul>
<li>HTTP header variables:  <code>HTTP_USER_AGENT, HTTP_REFERER, </code> <code>HTTP_COOKIE, HTTP_FORWARDED, HTTP_HOST, HTTP_PROXY_CONNECTION, </code> <code>HTTP_ACCEPT </code></li>
<li>Connection &amp; request variables:   <code>REMOTE_ADDR, REMOTE_HOST, REMOTE_USER, </code> <code>REMOTE_IDENT, REQUEST_METHOD, SCRIPT_FILENAME, </code> <code>PATH_INFO, QUERY_STRING, AUTH_TYPE</code></li>
<li>Server internal variables:   <code>DOCUMENT_ROOT, SERVER_ADMIN, </code> <code>SERVER_NAME, SERVER_ADDR, SERVER_PORT, SERVER_PROTOCOL, </code> <code>SERVER_SOFTWARE </code></li>
<li>System variables:   <code>TIME_YEAR, TIME_MON, TIME_DAY, </code> <code>TIME_HOUR, TIME_MIN, TIME_SEC, TIME_WDAY, TIME </code></li>
<li>mod_rewrite special values:   <code>API_VERSION, THE_REQUEST, REQUEST_URI, </code> <code>REQUEST_FILENAME, IS_SUBREQ</code></li>
</ul>
<p>The condition can be a simple string or a standard regular  expression, with additions like:</p>
<ul>
<li><code>&lt;, &gt;, = </code>simple comparison operators</li>
<li><code>-f</code> if <code>Something_to_test</code> is a file</li>
<li><code>-d</code> if <code>Something_to_test</code> is a directory</li>
</ul>
<p>As you can see, these are more than enough to specify a condition  like this one (taken from the mod_rewrite manual):</p>
<p><code> RewriteCond %{HTTP_USER_AGENT} ^Mozilla.*<br />
RewriteRule ^/$ /homepage.max.html [L]<br />
RewriteCond %{HTTP_USER_AGENT} ^Lynx.*<br />
RewriteRule ^/$ /homepage.min.html [L]<br />
RewriteRule ^/$ /homepage.std.html [L] </code></p>
<p>When a browser requests the index page, 3 things can happen:</p>
<ul>
<li>browser with a Mozilla engine the browser will be served  homepage.max.html</li>
<li>using Lynx (character-based browser) the homepage.min.html will  open</li>
<li>if the browser&#8217;s name doesn&#8217;t contain &#8216;Mozilla&#8217; nor &#8216;Lynx&#8217;, the  standard homepage.std.html file will be sent</li>
</ul>
<p>You can even disable users from accessing images from outside your  server:</p>
<p><code> RewriteCond %{HTTP_REFERER} !^$<br />
</code><code>RewriteCond %{HTTP_REFERER} !^http://localhost/.*$ [OR,NC]</code><code><br />
RewriteCond %{HTTP_REFERER} !^http://mysite.co.uk/.*$ [OR,NC]<br />
RewriteCond %{HTTP_REFERER} !^http://www.mysite.co.uk/.*$ [OR,NC]<br />
RewriteRule .*\.(gif|GIF|jpg|JPG)$ http://mysite.co.uk/images/bad.gif [L,R] </code></p>
<p>But of course, there are endless possibilities, including IP- or  time-dependant conditions, etc.</p>
<h5>For Advanced Users</h5>
<p>We mentioned user-friendliness in the introduction, and haven&#8217;t dealt  with it. First, let&#8217;s imagine we&#8217;re having a huge download site that has  the downloadable software separated into categories, each with a unique  id (which is used in the SQL SELECTs). We could links like  open.php?categoryid=23487678 to display the contents of a category.</p>
<p>To ensure that our URLs were easily memorized (eg.  http://www.downloadsite.com/Nettools/Messengers) we could use:</p>
<div id="adz"><script type="text/javascript">// < ![CDATA[
// < ![CDATA[
GA_googleFillSlot("Articles_6_300x250");
// ]]&gt;</script><script src="http://pubads.g.doubleclick.net/gampad/ads?correlator=1279930837876&amp;output=json_html&amp;callback=GA_googleSetAdContentsBySlotForSync&amp;impl=s&amp;a2ids=BPklg&amp;cids=So35UY&amp;pstok=gBOb0MdPSrcKDgoKCJbJTxDGyt_REhAA&amp;client=ca-pub-9603645151104616&amp;slotname=Articles_6_300x250&amp;page_slots=Articles_5_728x90%2CArticles_6_300x250&amp;cookie=ID%3D4028406b0312547a%3AT%3D1273961422%3AS%3DALNI_MaudDcimT2WiAeYqhXRzZShDqrkEg&amp;ga_vid=1621000694.1279930838&amp;ga_sid=1279930838&amp;ga_hid=139509323&amp;url=http%3A%2F%2Farticles.sitepoint.com%2Farticle%2Fguide-url-rewriting%2F4&amp;ref=http%3A%2F%2Farticles.sitepoint.com%2Farticle%2Fguide-url-rewriting%2F3&amp;lmt=1279930837&amp;dt=1279930838226&amp;cc=100&amp;biw=1008&amp;bih=541&amp;ifi=2&amp;adk=2986466219&amp;u_tz=60&amp;u_his=50&amp;u_java=true&amp;u_h=768&amp;u_w=1024&amp;u_ah=740&amp;u_aw=1024&amp;u_cd=24&amp;u_nplug=36&amp;u_nmime=140&amp;flash=10.1.53"></script><br />
 </p>
<div id="google_ads_div_Articles_6_300x250"><ins></ins><ins></ins></div>
<p><script type="text/javascript">// < ![CDATA[
// < ![CDATA[
GA_googleCreateDomIframe('google_ads_div_Articles_6_300x250' ,'Articles_6_300x250');
// ]]&gt;</script></p>
</div>
<p><code> RewriteRule ^/NetTools$ /test.php?target=3<br />
RewriteRule ^/NetTools/Messengers$ /test.php?target=34</code></p>
<p>assuming the ID is 3 for the NetTools category and 34 for Messengers  subcategory.</p>
<p>But our site is huge, as we&#8217;ve mentioned &#8211; who wants to hunt down all  the IDs from the database, and then edit the config file by hand?  No-one! Instead, we can use the mapping feature of mod_rewrite. Map  allows us to provide a replacement-table &#8211; stored in a single text file  &#8212; within a hash file (for fast lookups), or even served through an  external program!</p>
<p>For better performance I&#8217;d generate a single text file using PHP,  which contains the following:</p>
<p><code> NetTools            3<br />
NetTools/Messengers 34<br />
.<br />
.<br />
.<br />
and so on.</code></p>
<p>The <code>.htaccess</code> file would contain:</p>
<p><code> RewriteMap categories txt:/path/to/file/categoryids.txt<br />
RewriteRule ^(.*)$ open.php?categoryid=${categories:$1|0}</code></p>
<p>These lines tell mod_rewrite to read the categoryids.txt file upon  Apache startup, and provide the ID for the URL for open.php. The <code>|0</code> means that <code>categoryid</code> will be 0 if there&#8217;s no matching key  in the textfile.</p>
<p>You can also choose to serve the IDs on-the-fly via a script or other  executable code. The program is started by Apache on server startup,  and runs until shutdown. The program must have buffered I/O disabled,  read from the stdin, and write results to stdout &#8212; it&#8217;s that simple!</p>
<p>With RewriteMap you can do a lot more, including:</p>
<ul>
<li>load balancing through servers (using <code>rnd:</code>),</li>
<li>creation of a Webcluster that has an homogenous URL layout,</li>
<li>redirection to mirror sites without modifying your Web application,</li>
<li>denial of user access based on a hostlist,</li>
</ul>
<p>and so on.</p>
<h5>Tips, Tricks and Advice</h5>
<ol>
<li>Before using mod_rewrite in a production server, I&#8217;d recommend  setting up a testserver (or playground, whatever you prefer to call it).</li>
<li>During development, you must avoid using &#8216;old-fashioned&#8217;  URLs in your application.</li>
<li>There might still be need to verify data passed through the  URL (passing non-existing &#8212; too large or small &#8211; IDs, for example,  might be risky).</li>
<li>Writing &#8216;intelligent&#8217; RewriteRules saved me coding time and  helped me write simpler code. Using error_reporting(<code>E_ALL</code>);  everywhere (and we recommend it!), but I find it boring to do the  following for the ten thousandth time:<code>if (isset($_GET['id']) &amp;&amp; (validNumber($_GET['id']))<br />
if (isset($_GET['todo']) &amp;&amp; ($_GET['todo']=='deleteitem'))</code></p>
<p>The following trick helped to get rid of the extra <code>isset()</code> expression by providing all the needed parameters each time in the <code>RewriteRules</code>:</p>
<p><code>RewriteRule ^/products/[0-9]+$ products.php?id=$1&amp;todo=</code></p>
<p>I know, I know it&#8217;s not the answer to the meaning of life &#8212; but it&#8217;s  hard to show how nice and clear a solution this might provide in such a  short example.</li>
</ol>
<h5>Finally&#8230;</h5>
<p>That&#8217;s all for our  &#8216;brief&#8217; overview of mod_rewrite. After you&#8217;ve  mastered the basics, you&#8217;ll find you can easily create your own rules.  If you like the idea of URL rewriting, may want to play with mod_rewrite  &#8211; some ideas follow (note that the underlying PHP code is not important  in this case):</p>
<p><code>http://www.mysite.co.uk/1/2/3/content.html<br />
=&gt; 1_2_3_content.html</p>
<p>http://www.mysite.co.uk/1/2/3/content.html</p>
<p>=&gt; content.php ? category=1</code></p>
<p>http://www.mysite.co.uk/1/2/3/</p>
<p>=&gt; content.php ? category=1 &amp; subcat1 = 2 &amp; subcat2 = 3</p>
<p>http://www.mysite.co.uk/1/2/3/details</p>
<p>=&gt; content.php ? category=1 &amp; subcat1 = 2 &amp; subcat2 = 3</p>
<p>http://www.mysite.co.uk/bookshop/browse/bytitle</p>
<p>=&gt; library.php ? target=listbooks &amp; order = title</p>
<p>http://www.mysite.co.uk/bookshop/browse/byauthor</p>
<p>=&gt; library.php ? target=listbooks &amp; order = author</p>
<p>http://www.mysite.co.uk/bookshop/product/123</p>
<p>=&gt; library.php ? target=showproduct &amp; itemid=123</p>
<p><code>http://www.mysite.co.uk/bookshop/helpdesk/2<br />
=&gt; library.php ? target=showhelp &amp; page=2</p>
<p>http://www.mysite.co.uk/bookshop/registration</p>
<p>=&gt; library.php ? target=reg </code></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.laws-hosting.co.uk/index.php/2010/07/24/mod_rewrite-a-beginners-guide-to-url-rewriting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firm scrambles to patch vBulletin software flaw</title>
		<link>http://blog.laws-hosting.co.uk/index.php/2010/07/23/firm-scrambles-to-patch-vbulletin-software-flaw/</link>
		<comments>http://blog.laws-hosting.co.uk/index.php/2010/07/23/firm-scrambles-to-patch-vbulletin-software-flaw/#comments</comments>
		<pubDate>Fri, 23 Jul 2010 08:51:30 +0000</pubDate>
		<dc:creator>Peter Laws</dc:creator>
				<category><![CDATA[Security Issues]]></category>

		<guid isPermaLink="false">http://blog.laws-hosting.co.uk/?p=90</guid>
		<description><![CDATA[On July 13th, 2010, Internet Brands Company, the owner of vBulletin Board software application, has released an insecure version that allows even armature hackers to access many websites on a Web server. The flaw affects version 3.8.6 of the software, vBulletin. With a few key strokes a hacker can obtain the administrator&#8217;s username and password for the website. Please, urge your clients to immediately apply the security patch released by Internet Brands Company at: http://bit.ly/9QIgDj For more information about this security exploit, go to: http://bit.ly/9rKipU Thank you]]></description>
			<content:encoded><![CDATA[<p>On July 13th, 2010, Internet Brands Company, the owner of vBulletin  Board software application, has released an insecure version that allows  even armature hackers to access many websites on a Web server. The flaw  affects version <strong><span style="color: red;">3.8.6</span></strong> of the software,  vBulletin. With a few key strokes a hacker can obtain the  administrator&#8217;s username and password for the website.</p>
<p>Please, urge your clients to immediately apply the security patch  released by Internet Brands Company at: <a href="http://bit.ly/9QIgDj" target="_blank">http://bit.ly/9QIgDj</a></p>
<p>For more information about this security exploit, go to: <a href="http://bit.ly/9rKipU" target="_blank">http://bit.ly/9rKipU</a><br />
Thank you</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.laws-hosting.co.uk/index.php/2010/07/23/firm-scrambles-to-patch-vbulletin-software-flaw/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Recent Industry-wide Hacks and Malware Attacks</title>
		<link>http://blog.laws-hosting.co.uk/index.php/2010/07/15/recent-industry-wide-hacks-and-malware-attacks/</link>
		<comments>http://blog.laws-hosting.co.uk/index.php/2010/07/15/recent-industry-wide-hacks-and-malware-attacks/#comments</comments>
		<pubDate>Thu, 15 Jul 2010 20:07:01 +0000</pubDate>
		<dc:creator>Peter Laws</dc:creator>
				<category><![CDATA[Security Issues]]></category>

		<guid isPermaLink="false">http://blog.laws-hosting.co.uk/?p=83</guid>
		<description><![CDATA[There has been a Linux Platform hack gathering speed in the last few weeks which has already affected a couple of reputed Web Hosting companies in the industry. While there is no clarity on the exact method of the attacks, they seem to be targeting various plugins that might be part of the applications running on your websites. Much like the Gumblar attacks around the same time last year, we suggest that you keep the Web Applications running on your websites up to date. This  includes WordPress installations, or any other CMS which needs regular updates. Here are a few things that you can keep in mind: Always keep strong FTP Passwords (changing these from time to time is a good practice) Scan your local system with a good AntiVirus and Malware remover to make sure the system is infection free (Especially the machine used to upload data) Avoid 777 permissions on any file or folder. On our part, you can rest assured that we are taking all measures possible to avoid any such hack on our servers. Fortunately, we do not have any instances of such an attack on our servers yet. While we are doing everything we can [...]]]></description>
			<content:encoded><![CDATA[<p>There has been a Linux Platform hack gathering speed in the last few  weeks which has already affected a couple of reputed Web Hosting  companies in the industry. While there is no clarity on the exact method  of the attacks, they seem to be targeting various plugins that might be  part of the applications running on your websites.</p>
<p>Much like the <strong>Gumblar attacks</strong> around the same time last year, we suggest that you keep the Web Applications running on your websites up to date. This  includes WordPress installations, or  any other CMS which needs regular updates.</p>
<p>Here are a few things  that you can keep in mind:</p>
<ul>
<li>Always  keep strong FTP Passwords (changing these from time to time is a good  practice)</li>
<li>Scan your local system with a good AntiVirus and  Malware remover to make sure the system is infection free (Especially  the machine used to upload data)</li>
<li>Avoid 777 permissions on any  file or folder.</li>
</ul>
<p>On our part, you can rest assured that we are  taking all measures possible to avoid any such hack on our servers.</p>
<p>Fortunately, we do not have any instances of such  an attack on our servers yet. While we are doing everything we can to  safeguard you from such an attack, we will need you to be vigilant and  proactive in taking all precautionary measures.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.laws-hosting.co.uk/index.php/2010/07/15/recent-industry-wide-hacks-and-malware-attacks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Really Slick Screen Saver</title>
		<link>http://blog.laws-hosting.co.uk/index.php/2010/07/03/really-slick-screen-saver/</link>
		<comments>http://blog.laws-hosting.co.uk/index.php/2010/07/03/really-slick-screen-saver/#comments</comments>
		<pubDate>Sat, 03 Jul 2010 18:14:16 +0000</pubDate>
		<dc:creator>Peter Laws</dc:creator>
				<category><![CDATA[Non-Hosting]]></category>

		<guid isPermaLink="false">http://blog.laws-hosting.co.uk/?p=80</guid>
		<description><![CDATA[If you&#8217;re looking for another really slick screensaver, then look no further. Microcosm is now available for both Mac OS X and Windows! Do you know of any other awesome (free) screen savers out there? http://www.reallyslick.com]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re looking for another really slick screensaver, then look no  further. Microcosm is now available for both Mac OS X and Windows!</p>
<p>Do you know of any other awesome  (free) screen savers out there?</p>
<p><a class="aligncenter" href="http://www.reallyslick.com/" target="_blank">http://www.reallyslick.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.laws-hosting.co.uk/index.php/2010/07/03/really-slick-screen-saver/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New .COM &amp; .NET Prices from 30th June</title>
		<link>http://blog.laws-hosting.co.uk/index.php/2010/06/30/new-com-net-prices-from-30th-june/</link>
		<comments>http://blog.laws-hosting.co.uk/index.php/2010/06/30/new-com-net-prices-from-30th-june/#comments</comments>
		<pubDate>Wed, 30 Jun 2010 17:23:03 +0000</pubDate>
		<dc:creator>Peter Laws</dc:creator>
				<category><![CDATA[Domains]]></category>
		<category><![CDATA[com]]></category>
		<category><![CDATA[domains]]></category>
		<category><![CDATA[net]]></category>

		<guid isPermaLink="false">http://blog.laws-hosting.co.uk/?p=77</guid>
		<description><![CDATA[To accommodate the Registry price hike that was announced last year, will be increasing our prices for .COM and .NET Domains from the 30th of June, 2010 at 14:30. The new prices for .COM and .NET will be £7.00 Important: These prices will be applicable from the 30th of June, 2010 at 14:30; The prices mentioned will be applicable on .COM and .NET Domains only. The prices for .BIZ, .INFO, .ORG and .NAME Domains will not be modified; These prices are applicable to all years of Registration, Renewal and Transfer-in.]]></description>
			<content:encoded><![CDATA[<p>To accommodate the Registry price hike that was <a href="https://press.verisign.com/easyir/customrel.do?easyirid=AFC0FF0DB5C560D3&amp;version=live&amp;prid=570292&amp;releasejsp=custom_97" target="_blank"><span style="color: #0069e2;">announced</span></a> last year,  will be increasing our prices for .COM and .NET Domains from the <strong>30th  of June, 2010 at 14:30</strong>.</p>
<p>The new prices for .COM and .NET will be £7.00</p>
<p><strong>Important:</strong></p>
<ul>
<li>These prices will be applicable from the <strong>30th of June, 2010  at 14:30;<br />
</strong></li>
<li>The prices mentioned will be applicable on <strong>.COM and .NET  Domains only</strong>. The prices for .BIZ, .INFO, .ORG and .NAME  Domains will not be modified;</li>
<li>These prices are applicable to all years of <strong>Registration,  Renewal and Transfer-in.</strong></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.laws-hosting.co.uk/index.php/2010/06/30/new-com-net-prices-from-30th-june/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Secure Passwords: Tips For Creating Strong Passwords You Can Remember</title>
		<link>http://blog.laws-hosting.co.uk/index.php/2010/06/29/creating-secure-passwords-tips-for-creating-strong-passwords-you-can-remember/</link>
		<comments>http://blog.laws-hosting.co.uk/index.php/2010/06/29/creating-secure-passwords-tips-for-creating-strong-passwords-you-can-remember/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 17:41:04 +0000</pubDate>
		<dc:creator>Peter Laws</dc:creator>
				<category><![CDATA[Security Issues]]></category>
		<category><![CDATA[Tips & Tutorials]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[ftp]]></category>
		<category><![CDATA[passwords]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[security]]></category>

		<guid isPermaLink="false">http://blog.laws-hosting.co.uk/?p=71</guid>
		<description><![CDATA[One of the problems we see with passwords is that users forget them. In an effort to not forget them, they use simple things like their dog’s name, their son’s first name and birthdate, the name of the current month- anything that will give them a clue to remember what their password is &#8211; this is very very dangerous. For the curious hacker who has somehow gained access to your computer system this is the equivalent of locking your door and leaving the key under the doormat. Without even resorting to any specialised tools a hacker can discover your basic personal information &#8211; name, children’s name, birthdate, pet names, etc. and try all of those out as potential passwords. To create a secure password that is easy for you to remember, follow these simple steps: Do not use personal information. You should never use personal information as a part of your password. It is very easy for someone to guess things like your last name, pet&#8217;s name, child&#8217;s birth date and other similar details. Do not use real words. There are tools available to help attackers guess your password. With today&#8217;s computing power, it doesn&#8217;t take long to try every [...]]]></description>
			<content:encoded><![CDATA[<p>One of the problems we see with passwords is that users forget them. In an  effort to not forget them, they use simple things like their dog’s name,  their son’s first name and birthdate, the name of the current month-  anything that will give them a clue to remember what their password is &#8211; this is <strong>very very </strong>dangerous.</p>
<p>For the curious hacker who has somehow gained access to your computer  system this is the equivalent of locking your door and leaving the key  under the doormat. Without even resorting to any specialised tools a  hacker can discover your basic personal information &#8211; name, children’s  name, birthdate, pet names, etc. and try all of those out as  potential passwords.</p>
<p>To create a secure password that is easy for you to remember, follow  these simple steps:</p>
<ol>
<li><strong>Do not use personal information</strong>. You should never use  personal information as a part of your password. It is very easy for  someone to guess things like your last name, pet&#8217;s name, child&#8217;s birth  date and other similar details.</li>
<li><strong>Do  not use real words</strong>. There are tools available to help attackers  guess your password. With today&#8217;s computing power, it doesn&#8217;t take long  to try every word in the dictionary and find your password, so it is  best if you do  not use real words for your password.</li>
<li><strong>Mix different character types</strong>. You can make a password  much more secure by mixing different types of characters. Use some  uppercase letters along with lowercase letters, numbers and even special  characters such as &#8216;&amp;&#8217; or &#8216;%&#8217;.</li>
<li><strong>Use a passphrase</strong>. Rather than trying to remember a  password created using various character types which is also not a word  from the dictionary, you can use a passphrase. Think up a sentence or a  line from a song or poem that you like and create a password using the  first letter from each word.For example, rather than just having a password like &#8216;yr$1Hes&#8217;, you  could take a sentence such as &#8220;I like to read about security&#8221; and convert it to a password like  &#8216;!l2rAs&#8221;. By substituting the number &#8217;2&#8242; for the word &#8216;to&#8217; and  using an exclamation point in place of the &#8216;I&#8217;, you can  use a variety of character types and create a secure password that is  hard to crack, but much easier for you to remember.</li>
<li><strong>Use  a password management tool</strong>. Another way to store  and remember passwords securely is to use some sort of password  management tool. These tools maintain a list of usernames and passwords  in encrypted form. Some will even automatically fill in the username and  password information on sites and applications.</li>
</ol>
<p>Using the tips above will help you create passwords that are more  secure, but you should still also follow the following tips:</p>
<ul>
<li><strong>Use different passwords</strong>. You should use a different username &amp; password for each login or application you are trying to protect.  That way if one gets compromised the others are still safe. Another  approach which is less secure, but provides a fair tradeoff between  security and convenience, is to use one username and password for sites  and applications that don&#8217;t need the extra security, but use unique  usernames and more secure passwords on sites such as your bank or credit  card companies.</li>
<li><strong>Change your passwords</strong>. You should change your password  at least every 30 to 60 days. You should also not re-use a password for  at least a year.</li>
<li><strong>Enforce  stronger passwords:</strong> Rather than relying on every user of the  computer to understand and follow the instructions above, you can configure  Microsot Windows password policies so that Windows will not accept  passwords that don&#8217;t meet the minimum requirements.</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://blog.laws-hosting.co.uk/index.php/2010/06/29/creating-secure-passwords-tips-for-creating-strong-passwords-you-can-remember/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Top 5 WordPress Security Tips</title>
		<link>http://blog.laws-hosting.co.uk/index.php/2010/06/29/top-5-wordpress-security-tips/</link>
		<comments>http://blog.laws-hosting.co.uk/index.php/2010/06/29/top-5-wordpress-security-tips/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 17:27:40 +0000</pubDate>
		<dc:creator>Peter Laws</dc:creator>
				<category><![CDATA[Security Issues]]></category>
		<category><![CDATA[Tips & Tutorials]]></category>
		<category><![CDATA[blog]]></category>
		<category><![CDATA[cms]]></category>
		<category><![CDATA[plugins]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[wordpress]]></category>

		<guid isPermaLink="false">http://blog.laws-hosting.co.uk/?p=69</guid>
		<description><![CDATA[Below is a list of the top 5 tips that most WordPress administrators do not do, but should: 1. Don’t use the admin account – The default user account that is created with every installation of WordPress is the admin account. Unfortunately the entire world knows this, including hackers, and can easily launch a dictionary attack on your website to try and guess your password. If a hacker already knows your username that’s half the battle. It’s highly recommended to delete or change the admin account username. 2. Move your wp-config.php file – Did you know since WordPress 2.6 you can move your wp-config.php file outside of your root WordPress directory? Most users don’t know this and the ones that do don’t do it. To do this simply move your wp-config.php file up one directory from your WordPress root. WordPress will automatically look for your config file there if it can’t find it in your root directory. 3. Change the WordPress table prefix – The WordPress table prefix is wp_ by default. You can change this prior to installing WordPress by changing the $table_prefix value in your wp-config.php file, we recommend an unique value such as rtyujikj_. If a hacker [...]]]></description>
			<content:encoded><![CDATA[<p><img class="aligncenter size-medium wp-image-68" title="wordpress-logo-hoz-rgb" src="http://blog.laws-hosting.co.uk/wp-content/uploads/2010/06/wordpress-logo-hoz-rgb-300x67.png" alt="" width="300" height="67" /></p>
<p>Below is a list of the top 5 tips that most WordPress administrators  do not do, but should:</p>
<p><strong>1. Don’t use the admin account</strong> – The default user  account that is created with every installation of WordPress is the  admin account.  Unfortunately the entire world knows this, including  hackers, and can easily launch a dictionary attack on your website to  try and guess your password.  If a hacker already knows your username  that’s half the battle.  It’s highly recommended to delete or change the  admin account username.</p>
<p><strong>2. Move your wp-config.php file</strong> – Did you know since  WordPress 2.6 you can move your wp-config.php file outside of your root  WordPress directory?  Most users don’t know this and the ones that do  don’t do it.  To do this simply move your wp-config.php file up one  directory from your WordPress root.  WordPress will automatically look  for your config file there if it can’t find it in your root directory.</p>
<p><strong>3. Change the WordPress table prefix</strong> – The WordPress  table prefix is wp_ by default.  You can change this prior to  installing WordPress by changing the $table_prefix value in your  wp-config.php file, we recommend an unique value such as <strong>rtyujikj_</strong>.  If a hacker is able to exploit your website using  SQL Injection, this will make it harder for them to guess your table names and quite possibly keep them from doing SQL Injection at all.</p>
<p><strong>4. Use Secret Keys</strong> – This is probably the most  followed security tip on the list, but still amazed at how many  people don’t do this.  A secret key is a hashing salt that is used  against your password to make it even stronger.  Secret keys are set in  your wp-config.php file.  Simply visit  https://api.wordpress.org/secret-key/1.1 to have a set of randomly  generated secret keys created for you.  Copy the 4 secret keys to your  wp-config.php file and save.  You can add/change these keys at any time,  the only thing that will happen is all current WordPress cookies will  be invalidated and your users will have to log in again.</p>
<p><strong>5. htaccess lockdown</strong> – This is actually my favorite  tip from my presentation.  Using a .htaccess file you can lockdown your  wp-admin directory by IP address.  This means only IP addresses you  specify can access your admin dashboard URLs.  This makes it impossible  for anyone else to try and hack your WordPress backend.  To do this  simply create a file called .htaccess and add the following code to your  file, replacing xxx.xxx.xxx.xxx with your IP address:<br />
<code><br />
AuthUserFile /dev/null<br />
AuthGroupFile /dev/null<br />
AuthName "Access Control"<br />
AuthType Basic<br />
order deny,allow<br />
deny from all<br />
#IP address to Whitelist<br />
allow from xxx.xxx.xxx.xxx<br />
</code><br />
You can add more “<strong>allow from</strong>” lines so make sure to  add any IP addresses you plan on accessing your site from (ie Home,  Work, etc).  Remember most ISP use dynamic IPs, so your IP address  may change on reconnecting to your ISP.  If you get locked out just update your  .htaccess file or delete it all together.  This obviously is not a good  tip if you allow open registrations as you need to allow your users  access to wp-admin.</p>
<p>So, how many of these tips do you follow regularly?</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.laws-hosting.co.uk/index.php/2010/06/29/top-5-wordpress-security-tips/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
