<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.askapache.com/~d/styles/itemcontent.css"?><rss 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/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>AskApache Web Fire</title>
	
	<link>http://www.askapache.com</link>
	<description>.htaccess, Net Security, Server Tech, Web Development, Tutorials and Articles. Come through in something amazing.. blazing.</description>
	<lastBuildDate>Thu, 19 Nov 2009 12:21:49 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<image><link>http://www.askapache.com</link><url>http://www.askapache.com/nlogo.png</url><title>AskApache Web Fire</title></image><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.askapache.com/apache/htaccess" type="application/rss+xml" /><feedburner:emailServiceId>apache/htaccess</feedburner:emailServiceId><feedburner:feedburnerHostname>http://feedburner.google.com</feedburner:feedburnerHostname><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.askapache.com/apache/htaccess" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.askapache.com%2Fapache%2Fhtaccess" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:browserFriendly>Thanks for your Interest, you are very nice!</feedburner:browserFriendly><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>Update: Best Free Online Banking</title>
		<link>http://feeds.askapache.com/~r/apache/htaccess/~3/nkschTaxZmw/free-online-banking.html</link>
		<comments>http://www.askapache.com/making-money/free-online-banking.html#comments</comments>
		<pubDate>Thu, 22 Oct 2009 04:12:35 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Making Money]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[ally bank]]></category>
		<category><![CDATA[Chase Bank]]></category>
		<category><![CDATA[JP Morgan Chase]]></category>
		<category><![CDATA[Online Banking]]></category>
		<category><![CDATA[WaMu]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3548</guid>
		<description><![CDATA[<p><strong>WaMu Reincarnation!</strong></p>
<p>Man I was bummed about WaMu folding, they had the best banking site I've seen, and I've worked on a few myself.  And of course the biggest reason to love WaMu was that they actually paid YOU to borrow your money to lend to other people.  Can you even imagine that level of decency existing in the world?  It's been taken to such a low level by Chase I almost forget how to spell it.</p>

<p>So I picked up my October issue of <a href="http://www.wired.com/">Wired</a> to try and forget about such tragedies, and on the first page I flipped to was a 1/3 page advertisement for a bank that didn't beat around the bush at all.  No fine print of any kind, just loud and clear message that they will pay you to be their banking customer.  I wasted no time and quickly checked out the site, and within 5 minutes of landing on their homepage I was a customer, and a very happy one.  Even the name of this bank makes it clear they are not in the Microsoft Family Business with Chase and the other corporate pirates.</p>]]></description>
			<content:encoded><![CDATA[<p>Way back when I wrote about my <a href="http://www.askapache.com/webmaster/best-free-online-banking.html">favorite free banking which was WaMu</a>.  I also mentioned how JP Morgan Chase basically ripped me off with fees.  I to this day hate them for so easily putting into practice a policy of ripping people off.  So guess what happened since then?  WaMu went bankrupt due to getting way overextended with NorthWest Mortgages, and guess who swooped in and bought them?  JP Morgan Chase.  I cried myself to sleep for weeks because I knew if Chase now had control over my WaMu account is was only a matter of time before they start charging me money to let others borrow my money.</p>
<p>Today something great and something horrible happened within 5 minutes of each other.  I got a letter from Chase and opened it in front of my computer as i am always prepared for the worst when dealing with scum like that.  So I quickly scanned the friendly letter and almost exploded, it was a very polite letter happily informing me that my 1.9% APR on my credit card originally gotten from WaMu is from now on going to be <strong>29.99%</strong>.  That is not a typo.</p>
<h2><img src="/wp-content/uploads/2009/10/logo.png" alt="logo" title="logo" width="72" height="41" class="alignnone size-full wp-image-3550" /> ally bank</h2>
<p><img src="/wp-content/uploads/2009/10/Compare_panel.jpg" alt="Compare_panel" title="Compare_panel" width="737" height="180" class="alignnone size-full wp-image-3551" /></p>
<p>One of the main reasons I wanted to share this on my blog is because take a look at that website!  Someone sure knows how to make money, there is alot to admire about this site for you marketers and developers alike.  But seriously, getting a money-market account with no minimums, no monthly fees, no direct-deposit requirements, and none of all those other made-up pirate words is pretty unheard of.  If I was a journalist I would want to know who it is that is behind this.  But knowing how the banking industry is it&#8217;s probably their idea of a &#8220;lead-generating-tool&#8221; that they can later just buy outright and stick it to all the &#8220;leads&#8221;.   It&#8217;s basically the same setup as PayPal and their optional money market account that I use, except unlike paypal you can send and receive money without them taking a big chunk.  And who ever heard of such a thing as a no-penalty CD that doesn&#8217;t have hidden costs?</p>
<p class="anote">Have you heard congress wants to make it legally required to inform your blog readers if you are getting paid to promote a product?<br />Well don&#8217;t worry about me, I never have been paid and I literally just opened my account 20 minutes ago.  I&#8217;m just anal about not having to pay a bank to let them lend it to others.  ally vs Chase is the same thing as Open Source vs Microsoft.</p>
<p>Any other ideas?</p>
<p><a href="http://www.askapache.com/making-money/free-online-banking.html">Update: Best Free Online Banking</a> originally appeared on AskApache.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/ehdeOfJZG9XnMu2lr41EhWoNtwA/0/da"><img src="http://feedads.g.doubleclick.net/~a/ehdeOfJZG9XnMu2lr41EhWoNtwA/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ehdeOfJZG9XnMu2lr41EhWoNtwA/1/da"><img src="http://feedads.g.doubleclick.net/~a/ehdeOfJZG9XnMu2lr41EhWoNtwA/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.askapache.com/~ff/apache/htaccess?a=nkschTaxZmw:IPoB95Mo_Ek:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=nkschTaxZmw:IPoB95Mo_Ek:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=nkschTaxZmw:IPoB95Mo_Ek:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=nkschTaxZmw:IPoB95Mo_Ek:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=nkschTaxZmw:IPoB95Mo_Ek:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/making-money/free-online-banking.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.askapache.com/making-money/free-online-banking.html</feedburner:origLink></item>
		<item>
		<title>Firefox Add-ons for Web Developers</title>
		<link>http://feeds.askapache.com/~r/apache/htaccess/~3/9k_EdNItqeQ/best-firefox-addons-webdev.html</link>
		<comments>http://www.askapache.com/firefox/best-firefox-addons-webdev.html#comments</comments>
		<pubDate>Mon, 19 Oct 2009 00:14:07 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Making Money]]></category>
		<category><![CDATA[Music]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[askapache]]></category>
		<category><![CDATA[Firebug]]></category>
		<category><![CDATA[Firefox Addons]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[webdev]]></category>
		<category><![CDATA[YSlow]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3301</guid>
		<description><![CDATA[<p><a href="http://www.askapache.com/firefox/best-firefox-addons-webdev.html" class="IFL"><img src="/wp-content/uploads/2009/10/askapache-firefox-cache-116x102.png" alt="askapache favorite addons" title="askapache favorite addons" width="116" height="102" /></a><a href="https://addons.mozilla.org/en-US/firefox/collection/advanced-webdevelopment">Advanced Web Development by AskApache</a> is a <dfn title="Collections are groups of related add-ons assembled for easy sharing">Firefox Collection</dfn> I created since I'm always trying new Addons out and using multiple computers and I wanted a quick and easy way to install my favorite's and keep a running list.  Firebug, YSlow, LastPass, and Web Developer are the only ones I always use regularly.<br /><br />I like the idea of the last.fm but it's not as powerful as the site, which is awesome.  <em>Lately listening to <a href="http://www.last.fm/listen/artist/Kings%2Bof%2BLeon/similarartists">Kings of Leon Radio</a>...</em><br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href="https://addons.mozilla.org/en-US/firefox/collection/advanced-webdevelopment"><img src="https://addons.mozilla.org/en-US/firefox/images/collection_icon/27412/1253649941" /></a><a href="https://addons.mozilla.org/en-US/firefox/collection/advanced-webdevelopment">Advanced Web Development by AskApache</a> is a <dfn title="Collections are groups of related add-ons assembled for easy sharing">Firefox Collection</dfn> I created for myself to make finding and installing my favorite Firefox Add-ons simple and easy.</p>
<h2>My Setup</h2>
<p><img class="IFL" src="/wp-content/uploads/2009/10/askapache-firefox-cache.png" alt="askapache favorite addons" title="askapache favorite addons" width="283" height="250" />As this screenshot shows, I only use a handful of add-ons at a time.  These buttons allow me to clear the DNS/Cookies/Cache for whichever site I&#8217;m on when I click it.  Very very helpful for me as a web designer.  The 4th button there is just a restart button.  Other than those, Firebug, YSlow, LastPass, and Web Developer are the only ones I always use regularly.</p>
<p>I like the idea of the last.fm but it&#8217;s not as powerful as the site, which is awesome.  Lately I&#8217;ve been listening to <a href="http://www.last.fm/listen/artist/Kings%2Bof%2BLeon/similarartists">Kings of Leon Radio</a>&#8230; <br class="C" /></p>
<h2>Slow Firefox</h2>
<p><strong>The more add-ons you have</strong>, disabled or not, the slower Firefox is. (<em>unless you are running your profile folder in TMPFS</em>).   Also, bookmarks and settings like that have a performance hit.  I have been using Firefox since it launched way back when, and I have always kept my bookmarks when moving to new machines and new installations..  So with over 5 thousand bookmarks I finally did some debugging and discovered that was a huge cause of Firefox acting slow.  Now I am trying to migrate them all over to Google&#8217;s Gmarks, which knowing Google will be awesome eventually.</p>
<h2>Multiple Firefox Installations, Sorta</h2>
<p>The solution to all these problems is to use <strong>separate Firefox profiles</strong> which use separate folders to store your profile-specific extensions and settings.  So I have profiles with upwards of 40 Addons installed and enabled, and another profile that is built for speed&#8230; It&#8217;s very very slow to be running Firebug and have multiple tabs open..  You can use the profilemanager to load them specific profiles from the command line.  I personally use separate icons on my Windows Quick Launch that I just modified the shortcut pointing to firefox to also have the profile commandline.   Note also that you can have multiple profiles open and running simultaneously.. This lets you do some crazy networking and other random hacks like having many Firefox instances running each of which is configured to use a separate SOCKS Proxy or network interface, so you can really open up those pipes for some intense txrx.</p>
<p>You can do some very powerful things with Firefox that most people are unaware of, if you are interested start with these:</p>
<ul>
<li><a href="https://developer.mozilla.org/en/Setting_up_extension_development_environment">Setting up an extension development environment</a></li>
<li><a href="https://developer.mozilla.org/en/Command_Line_Options">Firefox Command Line Options</a></li>
</ul>
<hr class="C" />
<h3>About This Collection</h3>
<p>Web Development Add-ons for Advanced Web Developers.  I personally use these to work on Sites, Servers, WordPress, Javascript, PHP, CSS, XHTML, validation, page-loading, SEO, optimizing, and much more.  <a href="https://addons.mozilla.org/en-US/firefox/users/login?to=en-US%2Ffirefox%2Fcollection%2Fadvanced-webdevelopment%3Fadvancedsearch%3D1%26show%3D100">Add this collection</a>.</p>
<p><strong>Created by:</strong><a href="https://addons.mozilla.org/en-US/firefox/user/145961">AskApache</a></p>
<p><strong>Updated:</strong>September 22, 2009 </p>
<h3>Share this Collection</h3>
<ul>
<li class="digg"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=digg">Digg this!</a></li>
<li class="facebook"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=facebook">Post to Facebook</a></li>
<li class="delicious"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=delicious">Add to Delicious</a></li>
<li class="myspace"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=myspace">Post to MySpace</a></li>
<li class="friendfeed"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=friendfeed">Share on FriendFeed</a></li>
<li class="twitter"><a href="https://addons.mozilla.org/en-US/firefox/collections/share/advanced-webdevelopment?service=twitter">Post to Twitter</a></li>
</ul>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13316?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">History Tree</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13316/1254409345" alt="" height="32" width="32" class="IFL" />Find any page you have visited quickly and easily. Shows your browsing history as a tree of tabs, with thumbnail screenshots of the web-pages in every tab you have opened. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4882?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Scope</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Preview and navigate tab contents through popup. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1480?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Control</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Take control of your tabs!  Purposely lightweight extension with the following features&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5000?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ShareThis</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5000/1248389010" alt="" height="32" width="32" class="IFL" />ShareThis makes sharing any online content quick and easy. The ShareThis plugin allows you to share to any contact via email, text message, Facebook, Twitter and more.  You can also store your shares for later to reshare with the ShareThis ShareBox. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12377?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FirePalette</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12377/1244736178" alt="" height="32" width="32" class="IFL" />Adds a color picker to Firebug&#8217;s CSS panel. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13000?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab History Menu</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13000/1252809752" alt="" height="32" width="32" class="IFL" />When click on the selected tab, a history menu corresponding to it will display. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/8426?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SyncPlaces</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/8426/1252087590" alt="" height="32" width="32" class="IFL" />Synchronizes your bookmarks, passwords and password exceptions between browsers. Uses your own (or third party) web or ftp server so you have complete control and privacy. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10704?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">CSS Usage</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10704/1255464704" alt="" height="32" width="32" class="IFL" />Firebug extension to view which CSS rules are actually used. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9641?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Inline Code Finder for Firebug</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9641/1246025189" alt="" height="32" width="32" class="IFL" />Inline Code Finder is an add-on to Firebug, to be able to find HTML elements<br class="C" /></p>
<blockquote class="publisher-comment"><p>Provides some additional capabilities to firebug to find inline code as opposed to external files.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4723?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Save Complete</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Saves a webpage completely, providing a better alternative to the flawed built-in save functionality of Firefox. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Another of my personal favorites, modifies the &#8220;Save complete page&#8221; option of firefox to truly be more complete, I don&#8217;t understand why firefox doesn&#8217;t already do this.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10615?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireDownload</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10615/1249999245" alt="" height="32" width="32" class="IFL" />The FireDownload extension for Firefox and Wyzo lets you manage and accelerate your web downloads up to 10x faster! With FireDownload, download acceleration is seamlessly displayed within the downloads window. Try the ultimate download accelerator! <br class="C" /></p>
<blockquote class="publisher-comment"><p>Pretty nice and unobtrusive download enhancer.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13255?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Xmarks BYOS Edition</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13255/1248393038" alt="" height="32" width="32" class="IFL" />Bookmark Sync &#8220;Bring Your Own Server&#8221; Edition (BYOS). For expert users who wish to sync their bookmarks and passwords using their own FTP or WebDAV server. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13128?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FormBug</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />An extension to Firebug to make dealing with forms easier <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/13135?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Widerbug</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/13135/1247888469" alt="" height="32" width="32" class="IFL" />Firebug Evolved. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11588?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SyntaxHighlighter</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />a syntax highlighter, based on SyntaxHighlighter(http://code.google.com/p/syntaxhighlighter/), support lots of program languages. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds syntax highlighting, somewhat intensive.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2318?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Total Validator</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2318/1252747670" alt="" height="32" width="32" class="IFL" />Perform multiple validations and take screen shots in one go. This 5-in-1 validator works with external, internal, or local web pages using the Total Validator service or local copy of the desktop tool&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/115?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ReloadEvery</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/115/1250716156" alt="" height="32" width="32" class="IFL" />Reloads web pages every so many seconds or minutes. The function is accessible via the context menu (menu you get when you right click on a web page) or via a drop down menu on the reload button &#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Love this plugin, replaces the reload button with a look-alike button with a drop-down menu that lets you enable automatic reloading of a tab (or all tabs) and set the number of seconds between reloads.  I&#8217;ve found it very useful for checking cookie behaviour and cache setups, its also nice if you want to keep checking a page for updates.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1985?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Window Resizer</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Resize your browser to various standard resolution sizes&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Quickly resize your window to the common sizes to see what a site looks like for users with that resolution.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4415?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Font Finder</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Get all CSS styles of selected text in Firefox / Thunderbird&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Locate the fonts that are in use on a webpage.  Small and unobtrusive.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12632?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireQuery</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12632/1248402877" alt="" height="32" width="32" class="IFL" />Firebug enhancements for jQuery (requires Firebug 1.3+) <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds jquery support, I usually keep disabled even though I personally use jquery for web development.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5362?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Alexa Sparky</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5362/1255562428" alt="" height="32" width="32" class="IFL" />Alexa Internet&#8217;s official add-on for Firefox!  Get Alexa data in your status bar. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Shows the alexa rank of a site, I like it but it does make new HTTP requests for each page, so I disable it alot for privacy or speed.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5392?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Dust-Me Selectors</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5392/1246551563" alt="" height="32" width="32" class="IFL" />Finds unused CSS selectors. <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of the newer add-ons I&#8217;ve been using.  Lets you find which CSS rules are actually in use on a page, thus helping you to minimize and streamline CSS.  Very cool but it is a little resource intensive so by default I keep it disabled.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11249?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ToggleUseDocColors</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Toggles Tools-&gt;Options-&gt;Content-&gt;Colors:Allow pages to choose their own colors&#8230; option with a single keystroke (Ctrl+M) <br class="C" /></p>
<blockquote class="publisher-comment"><p>Use the documents colors or other.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3606?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FoxTor</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />FoxTor: Anonymous Web Browsing using the encrypted TOR network&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10434?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bing</a></h4>
<p> <img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10434/1247527217" alt="" height="32" width="32" class="IFL" />This is the only officially supported Bing add-on, provided by the Bing team in Microsoft. Bing is a search engine that finds and organizes the answers you need so you can make faster, more informed decisions. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9640?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Inline Code Finder</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9640/1245858044" alt="" height="32" width="32" class="IFL" />Inline Code Finder is a tool to traverse through all elements in a web page, and when it finds a HTML element with any of these, it will highlight them: * Inline JavaScript events * Inline style * javascript: links <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2648?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">MM3-ProxySwitch</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2648/1233685187" alt="" height="32" width="32" class="IFL" />In the Firefox Browser (and other Mozilla programs) you can per default configure only the setting for one internet connection. With the MM3-ProxySwitch you can manage different configurations and simply switch over between these. <br class="C" /></p>
<blockquote class="publisher-comment"><p>If like me you often connect to websites by proxying firefox through SSH Tunnels, then you can use this MM3-ProxySwitch add-on to run 3 different instances of firefox (by using multiple firefox profiles) that EACH use a different Proxy.  This is useful if you want to MAX out your download speed by downloading using multiple tunnels to do the work. </p>
<p>            Also useful for just plain multiple proxy configurations, very easy, and super extremely unobtrusive and low-resource intensive.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6683?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Firecookie</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6683/1251484013" alt="" height="32" width="32" class="IFL" />Firecookie is an extension for Firebug that makes possible to view and manage cookies in your browser <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of my personal favorites, adds a tab to firebug that lets you view live cookies being set, deleted, and updated, and lets you edit, and delete cookies of a page LIVE.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9780?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">RESTClient</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9780/1250817670" alt="" height="32" width="32" class="IFL" />RESTClient is a firefox extension use to visit and test RESTful/WebDav services. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5403?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Java Console 6.0.02</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5403/1189002765" alt="" height="32" width="32" class="IFL" />Java Console Extension for Java SE 1.6.0_02 (version 6 update 2). <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2325?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">RSS Ticker</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />RSS Ticker loads your Live Bookmarks and scrolls their entries across your screen while you surf. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Amazingly awesome add-on that scrolls rss feeds across a small area, helpful to keep track of various feeds and your own sites feeds.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6535?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Sidebar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6535/1244499111" alt="" height="32" width="32" class="IFL" />Displays previews of your tabs in your sidebar. <br class="C" /></p>
<blockquote class="publisher-comment"><p>I like this one more than the tab preview add-ons, lets me find a tab quickly but only when I want by opening the sidebar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12065?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">CryptoFox</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12065/1255638751" alt="" height="32" width="32" class="IFL" />CryptoFox is an encryption/decryption tool for Mozilla Firefox, with dictionary attack support for cracking MD5 passwords. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9027?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bookmark Current Tab Set</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds options to quickly bookmark all tabs in a window and store them in a bookmark folder that is given the date (and optionally the time) as its name. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3362?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Update Scanner</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3362/1252360045" alt="" height="32" width="32" class="IFL" />Monitors web pages for updates. Useful for websites that don&#8217;t provide Atom or RSS feeds. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/139?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Image Zoom</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/139/1231445959" alt="" height="32" width="32" class="IFL" />Adds zoom functionality for images&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Simple image zooming functionality.  Small and useful add-on.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3780?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FaviconizeTab</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3780/1218612666" alt="" height="32" width="32" class="IFL" />This extension adds a new &#8220;FaviconizeTab&#8221; option to the context menu of the tab&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Nice to Faviconize your most-often-used sites</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2489?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">CacheViewer</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />This extenion is GUI Front-end of &#8220;about:cache&#8221;&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Just a shortcut to the about:cache area.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6366?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireGestures</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6366/1254150116" alt="" height="32" width="32" class="IFL" />A customizable mouse gestures extension which enables you to execute various commands and user scripts with five types of gestures. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7189?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Firebug Net History Panel Overlay</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds history functionality to firebug net panel. Requires Firebug 1.2.0b4 or 1.2.0b6 For Firebug versions 1.1.* please use Net Panel Add-on Version 0.2.1 <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3880?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Add Bookmark Here ²</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3880/1253393237" alt="" height="32" width="32" class="IFL" />Add a menuitem &#8220;Add Bookmark Here&#8230;&#8221; to Bookmarks&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5914?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">DNS Cache</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5914/1246397200" alt="" height="32" width="32" class="IFL" />Allows you to disable and enable the DNS Cache of Firefox <br class="C" /></p>
<blockquote class="publisher-comment"><p>The final caching add-on that I absolutely LOVE.  Lets you add anywhere on your toolbar to clear the DNS cache of firefox.  I have  this, clear cache, and clear cookies next to each other on the far left of my bookmarks toolbar, I use them ALOT.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7907?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Manage Folders</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/7907/1248060550" alt="" height="32" width="32" class="IFL" />Places a &#8220;Manage Folder&#8221; item on the context menu of bookmark folders, which opens the &#8220;Places Organizer&#8221; expanded to that folder. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2214?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">View Dependencies</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />View Dependencies adds a tab to the Page Info window, in which it lists all the files which were loaded to show the current page. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2275?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Torbutton</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2275/1249863832" alt="" height="32" width="32" class="IFL" />Torbutton provides a button to securely and easily enable or disable the browser&#8217;s use of Tor. It is currently the only addon that will safely manage your Tor browsing to prevent IP address leakage, cookie leakage, and general privacy attacks. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Quick way to switch firefox to use the TOR network (I recommend the free vidalia suite) which is useful for web developers that rely on an IP address in certain programming and setups.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5447?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Kit</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5447/1249227762" alt="" height="32" width="32" class="IFL" />Tab grouping, vertical tab tree, multi-rows, and various tweaks for power users. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3559?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">QuickRestart</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3559/1241624360" alt="" height="32" width="32" class="IFL" />Ever needed to restart Firefox after enabling or disabling an extension, switching to a new theme, or modifying configuration files (such as userChrome.css or user.js)? This simple extension adds a &#8220;Restart Firefox&#8221; item to the &#8220;File&#8221; menu. You can also use the Ctrl+Alt+R keyboard shortcut, or the included toolbar button. <br class="C" /></p>
<blockquote class="publisher-comment"><p>A button you can place anywhere that restarts the browser just like you do after updating add-ons.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1759?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Organize Status Bar</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />This extension will enable you to organize your status bar icons.  You can now rearrange or remove any item (icon or text) in the Firefox status bar.  If your status bar is full and cluttered like mine was, give this a try. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you rearrange the items on the status bar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/722?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">NoScript</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/722/1255474235" alt="" height="32" width="32" class="IFL" />The best security you can get in a web browser! Allow active content to run only from sites you trust, and protect yourself against XSS and Clickjacking attacks. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2109?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FEBE</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2109/1255569901" alt="" height="32" width="32" class="IFL" />FEBE (Firefox Environment Backup Extension) allows you to quickly and easily backup your Firefox extensions.  In fact, it goes beyond just backing up &#8212; It will actually rebuild your extensions individually into installable .xpi files.  Now you can easily synchronize your office and home browsers. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very helpful and well-designed add-on that lets you backup your entire firefox, or individual add-ons, or both!</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10897?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Check Places</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10897/1255544495" alt="" height="32" width="32" class="IFL" />Checks your bookmarks are valid and the pages still exist. Also checks for duplicates and for empty folders and can restore missing favicons. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1027?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">All-in-One Sidebar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1027/1248433103" alt="" height="32" width="32" class="IFL" />All-in-One Sidebar (AiOS) is an award-winning sidebar control, inspired by Opera&#8217;s. It lets you quickly switch between sidebar panels, view dialog windows such as downloads, extensions, and more in the sidebar, or view source or websites in the sidebar. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2888?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">GMarks</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />GMarks helps you sync &#038; manage your bookmarks with Google Bookmarks&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11950?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Add-on Collector</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/11950/1252025520" alt="" height="32" width="32" class="IFL" />There&#8217;s a new way to manage and find favorite add-ons. Comment, share, and sync collections, all from your browser. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you get updates and makes it very easy to browse a collection such as this one.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2144?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Advanced Dork:</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2144/1249684650" alt="" height="32" width="32" class="IFL" />Advanced Dork: gives quick access to Google&#8217;s Advanced Operators directly from the context menu&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very unobtrusively makes the advanced google search operators available.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2032?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Yahoo! Toolbar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2032/1253720246" alt="" height="32" width="32" class="IFL" />Use Yahoo! and the web faster, safer, and easier with new mail notification, search suggestions, online bookmarks, free spyware scanning, and more&#8230; Save time with the new Yahoo! Toolbar 2.0, now in beta at toolbar.yahoo.com/beta. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3102?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Email This!</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3102/1253158256" alt="" height="32" width="32" class="IFL" />Email This! will send your recipient the link, title, &#038; highlighted text of the page you are viewing using GMail, Google Apps GMail, Yahoo, and Stand-Alone Mail Clients like Outlook Express, Thunderbird, &#038; More! If you hate toolbar buttons don’t fret because I&#8217;ve included a right-click pop-up menu and access keys! <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2062?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab To Window</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2062/1244572621" alt="" height="32" width="32" class="IFL" />Open a tab in a new window&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>I have wanted this type of functionality for soo long.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2323?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Cache View</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Cache View is a Firefox extension that displays Google&#8217;s Cache, Coral&#8217;s Cache, and Wayback Machine&#8217;s Cache cache of an open tab or selected link via a right-click or the Tools menu. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Useful to notice how often a page on your site is crawled and cached by these engines.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6984?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Lazarus: Form Recovery</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6984/1252590349" alt="" height="32" width="32" class="IFL" />Never lose anything you type into a web form again! Lazarus securely auto-saves all forms as you type, so after a crash, server timeout, or whatever, you can go back to the form, right click, &#8220;recover form&#8221;, and breathe a sigh of relief. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Saves your form data securely as you enter it, and provides a way to recover that form data if your firefox crashes (more likely windows crashes) and that way you won&#8217;t lose anything you already entered.  This will slow down firefox alot though.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6132?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tab Preview</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Preview tab contents on mouseover <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6937?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Multirow Bookmarks Toolbar</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Multi Row Bookmarks Toolbar.<br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2517?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Googlepedia</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Shows you a relevant Wikipedia article along with your search results. Clicking links in the article will trigger new Google searches, making it a very useful research tool&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds wikipedia results right next to google results, very helpful to keep an eye on what is authoritative, and often get the best information fast.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1237?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">QuickJava</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Allows quick enable and disable of Java and Javascript from&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3082?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Undo Closed Tabs Button</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3082/1244495823" alt="" height="32" width="32" class="IFL" />Tired of going to History -&gt; Recently Closed Tabs just to undo a closed tab? Then this extension is for you!  This extension allows you to undo closed tabs via a toolbar and/or tab bar button or the right-click context menu. <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of my personal favorites, adds back the most recently closed tab, very helpful.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10618?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Faviconiac Search Engines</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10618/1247849922" alt="" height="32" width="32" class="IFL" />Adds PNG favicons to some search engines and web directories, such as Google, Yahoo, Bing, Ask, Altavista, Wikipedia, AOL, Dmoz, Alexa, del.icio.us and others. <br class="C" /></p>
<blockquote class="publisher-comment"><p>This is helpful to get a better feel for search engine results by adding their sites favicon to the search results page, is somewhat HTTP Request intensive however.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3928?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bookmark This Page Plus</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3928/1247125860" alt="" height="32" width="32" class="IFL" />Adds a menu item in each sub folder of the bookmarks menu to bookmark the current page. Just as seen in the Opera browser. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1595?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Remove Cookie(s) for Site</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1595/1214859152" alt="" height="32" width="32" class="IFL" />A very simple extension to remove all the cookies of currently opened site. It adds an option to the Right Click menu of the page, and a toolbar button to perform this operation. It displays the status of operation in the status bar. <br class="C" /></p>
<blockquote class="publisher-comment"><p>This is invaluable, it removes all the cookies from whichever domain you are currently viewing.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/967?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Modify Headers</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Add, modify and filter http request headers.  You can modify the user agent string, add headers to spoof a mobile request (e.g. x-up-calling-line-id) and much more.  Take a look at the help tab of the Modify Headers window&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Pretty awesome, lets you modify the HTTP Headers your browser is sending, useful to check accessibility, server settings, language settings, etc.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2625?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">OPML Support</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />OPML Support adds OPML import/export functionality to the Firefox Bookmarks manager. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6647?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">HttpFox</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />An HTTP analyzer addon for Firefox <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/8879?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FoxTab</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/8879/1249840764" alt="" height="32" width="32" class="IFL" />3D in your browser!  FoxTab brings innovative 3D functionality to your Firefox. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Super awesome cool.  If your machine is fast this is a really helpful add-on.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/655?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">View Source Chart</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/655/1246405984" alt="" height="32" width="32" class="IFL" />View Source In Color-Coded Chart Get V2.8 w/ a brand new feature from jennifermadden.com <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of my long-time, all-time favorites that lets you view the source code of a website, but in a color-coded and formatted view.  Very nice and helpful for (X)HTML developers.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4072?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Smart Bookmarks Bar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/4072/1234555016" alt="" height="32" width="32" class="IFL" />Not enough place on your bookmarks bar ?&#8230; Smart Bookmarks Bar extension comes right here by hiding bookmarks names and only showing icons. Bookmark names will be displayed on mouse over. <br class="C" /></p>
<blockquote class="publisher-comment"><p>For those who frequently use the bookmarks in the firefox bookmarks toolbar, this is a great way to show more in a cleaner way.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1433?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Extended Statusbar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1433/1246438548" alt="" height="32" width="32" class="IFL" />A Statusbar with speed, percentage, time and loaded size (similar to Opera&#8217;s one) <br class="C" /></p>
<blockquote class="publisher-comment"><p>Provides much more information unobtrusively on your statusbar, very cool!</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10300?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Email Yourself!</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10300/1253228434" alt="" height="32" width="32" class="IFL" />Email Yourself! allows you to email yourself the link, title, and a selected summary of the webpage you are viewing using GMail. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/125?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SwitchProxy Tool</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />SwitchProxy lets you manage and switch between multiple proxy configurations&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2499?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">LiveClick</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds feed reading, notifications, favicons, and other enhancements to Live Bookmarks. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7314?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Places&#8217; Tooltips</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />This addon enhances all the tooltips in Firefox. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/11173?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Multi Smart Search</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />&#8220;Multi smart search&#8221; displays a new context menu including all the installed search engine. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9275?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SortPlaces</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9275/1252087512" alt="" height="32" width="32" class="IFL" />Sorts your bookmarks in a variety of ways. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/433?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Flashblock</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/433/1247913103" alt="" height="32" width="32" class="IFL" />Never be annoyed by a Flash animation again! Blocks Flash so it won&#8217;t get in your way, but if you want to see it, just click on&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you block flash for all/specific websites/domains, which is pretty nice capability to test both your sites for non-flash viewers, and speeds up firefox.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6249?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Google Toolbar</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6249/1237314369" alt="" height="32" width="32" class="IFL" />Take the power of Google with you anywhere on the Web <br class="C" /></p>
<blockquote class="publisher-comment"><p>A great add-on that lets you use hundreds of google tricks and tools.  Very helpful but also makes a lot of background HTTP requests so privacy-conscious or speed-freaks will want it disabled.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6622?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">DOM Inspector</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />DOM Inspector is a tool that can be used to inspect and edit the live DOM of any web document or XUL application. The DOM hierarchy can be navigated using a two-paned window that allows for a variety of different views on the document and all nodes within. Note:  This add-on depends on binary changes to Firefox, and will not work with Firefox 2. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Way to inspect the DOM of a page, useful for web developers.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6459?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Stay-Open Menu</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/6459/1250004873" alt="" height="32" width="32" class="IFL" />Enables multiple selections from Bookmarks Menu,  History Menu, or Smart Location Bar (awesomebar)  dropdown list, without reopening menu or using sidebar. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/710?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Menu Editor</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Customize application menus: Rearrange or remove menuitems from the main context menu (right-click menu) and main menubar (File Edit View etc.) <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/4838?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Multiple Tab Handler</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/4838/1251873082" alt="" height="32" width="32" class="IFL" />Provides feature to close multiple tabs. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1815?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Console²</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1815/1246698544" alt="" height="32" width="32" class="IFL" />Console² (pronounced Console Squared or Console Two) replaces the JavaScript Console with what could be the next generation Error Console. From v0.5 includes the Console Filter extension previously available separately from the Console² website. <br class="C" /></p>
<blockquote class="publisher-comment"><p>An advanced java script console.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/6271?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Bookmark Previews</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Bookmark Previews adds an album view and thumbnail view to the bookmarks manager. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Now this one is what I call genius.  Lets you view previews of your bookmarks!  Great if like me you have over a thousand bookmarks.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/8542?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">LastPass Password Manager</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/8542/1252161868" alt="" height="32" width="32" class="IFL" />LastPass is a free online password manager and Form Filler that makes your web browsing easier and more secure.   LastPass supports IE and Firefox as Plugins (Opera, Safari, Chrome, iPhone, Opera Mini via Bookmarklets), allows you to import from every major password storage vendor and export too, captures passwords that other managers won&#8217;t including many AJAX forms, and allows you to make strong passwords easily.  Your sensitive data is encrypted _locally_ before upload so even LastPass cannot get access to it.  One Time Passwords &#038; Screen Keyboard help protect your master password. <br class="C" /></p>
<blockquote class="publisher-comment"><p>What can I say, this add-on is in my top 10 for sure, and I recommend it to all my friends and even my family.  Lets me create very secure passwords for sites that I don&#8217;t have to remember because lastpass remembers them for me, and stores them encrypted on both a usb medium I keep, and on their servers.  So when I use someone elses computer or reinstall firefox, I have all my usernames and passwords, and its just sooooooooooooooooo useful.  Get this add-on, it truly is a secure way to only have to remember 1 password from now on, thus LastPass.  The last password you need.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1956?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tabs Open Relative</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1956/1211284492" alt="" height="32" width="32" class="IFL" />Tabs Open Relative makes all new tabs open to the right of the current tab, rather than at the far right of the tab bar (optionally this only applies to links). <br class="C" /></p>
<blockquote class="publisher-comment"><p>This stops that annoying default of opening tabs wayy on the right.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/10909?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Coral IE Tab</a></h4>
<p> <img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/10909/1255054707" alt="" height="32" width="32" class="IFL" />An enhanced version of IE Tab which enables you to use the embedded IE engine within tabs of Mozilla Firefox. It supports Adblock Plus in IE, and can sync cookies between IE and Firefox. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/966?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Tamper Data</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Use tamperdata to view and modify HTTP/HTTPS headers and post parameters&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Useful for checking form validation and security, lets you tamper data! lol</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/5369?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">YSlow</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/5369/1253220367" alt="" height="32" width="32" class="IFL" />YSlow analyzes web pages and why they&#8217;re slow based on Yahoo!&#8217;s rules for high performance web sites. YSlow uses Yahoo!&#8217;s Smush.it service, which is subject to Smush.it Terms of Use: http://info.yahoo.com/legal/us/yahoo/smush_it/smush_it-4378.html <br class="C" /></p>
<blockquote class="publisher-comment"><p>One of the top 3 most important and helpful add-ons for firefox.  Web Developers who don&#8217;t use this one are simply irresponsible.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/539?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">MeasureIt</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Draw out a ruler to get the pixel width and height of any elements on a&#8230; <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/271?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">ColorZilla</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/271/1234546689" alt="" height="32" width="32" class="IFL" />Advanced Eyedropper, ColorPicker, Page Zoomer and other colorful goodies&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>A must-have add-on for anyone using CSS or developing websites, very amazing, highly capable add-on.  The one issue is that is is somewhat of a resource-hog.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/748?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Greasemonkey</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/748/1253968926" alt="" height="32" width="32" class="IFL" />Allows you to customize the way a webpage displays using small bits of JavaScript. &#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you use user-contributed javascripts (or your own of course) that modifies the behavior and/or appearance of many different websites.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/684?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireFTP</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/684/1254121244" alt="" height="32" width="32" class="IFL" />FireFTP is a free, secure, cross-platform FTP client for Mozilla Firefox which provides easy and intuitive access to FTP servers. <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7943?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Pixel Perfect</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/7943/1254757574" alt="" height="32" width="32" class="IFL" />Pixel Perfect is a Firefox/Firebug extension that allows web developers and designers to easily overlay a web composition over top of the developed HTML. * Requires Firebug <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/60?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Web Developer</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/60/1252695377" alt="" height="32" width="32" class="IFL" />The Web Developer extension adds a menu and a toolbar with various web developer tools. <br class="C" /></p>
<blockquote class="publisher-comment"><p>This add-on is 1 of the top 2 most important add-ons for web developers.  The other is firebug.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1843?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Firebug</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1843/1254249333" alt="" height="32" width="32" class="IFL" />Firebug integrates with Firefox to put a wealth of development tools at your fingertips while you browse. You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page&#8230; Firebug 1.4 requires Firefox 3.0 or higher. <br class="C" /></p>
<blockquote class="publisher-comment"><p>By far, without a doubt, the single most important and valuable add on for ANY web developer.  This is the one that is definitely required.  The features are too numerous to name here.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3829?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Live HTTP Headers</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3829/1245295166" alt="" height="32" width="32" class="IFL" />View HTTP headers of a page and while&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very helpful for those that don&#8217;t have and use wireshark.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/2464?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FoxyProxy</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/2464/1254948830" alt="" height="32" width="32" class="IFL" />FoxyProxy is an advanced proxy management tool that completely replaces Firefox&#8217;s limited proxying capabilities. It offers more features than SwitchProxy, ProxyButton, QuickProxy, xyzproxy, ProxyTex, TorButton, etc. <br class="C" /></p>
<blockquote class="publisher-comment"><p>The most complete proxifying tool for firefox, multiple configurations possible.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/321?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">SearchStatus</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/321/1254725500" alt="" height="32" width="32" class="IFL" />Display the Google PageRank, Alexa rank, Compete ranking and SEOmoz Linkscape mozRank anywhere in your browser, along with fast keyword density analyser, keyword/nofollow highlighting, backward/related links, Alexa info and more. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds a very unobtrusive way to check the pagerank, and several other SEO statistics but only when you click a button (if configured that way) very helpful occasionally.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/201?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">DownThemAll!</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/201/1253178038" alt="" height="32" width="32" class="IFL" />The first and only download manager/accelerator built inside Firefox! <br class="C" /></p>
<blockquote class="publisher-comment"><p>Very nice, easy, fast, and unobtrusive add-on that lets you download all files of a certain type to a certain save location, lets you use builtin filters or configure your own using basic REGEX.  Very helpful.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/1801?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Clear Cache Button</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/1801/1248704772" alt="" height="32" width="32" class="IFL" />Adds a clear cache toolbar button. After installing the extension, find the clear cache button in the toolbar customization&#8230; <br class="C" /></p>
<blockquote class="publisher-comment"><p>A button you can add to your toolbar that clears your firefox cache (not cookies or history) which is invaluable for web developers.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/12006?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Wolfram Alpha Google</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/12006/1254285310" alt="" height="32" width="32" class="IFL" />Display Wolfram Alpha results in Google searches. No need to switch search engines when you can use both at once! <br class="C" /></p>
<blockquote class="publisher-comment"><p>The new search is a glimpse at the future of computing.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/3895?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Personal Menu</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/3895/1253278678" alt="" height="32" width="32" class="IFL" />&#8220;Menus Toolbar&#8221; item is now available in Toolbar Context Menu and you may hide it forever! <br class="C" /></p>
<blockquote class="publisher-comment"><p>Lets you go beyond firefox builtin menu editing and create a custom toolbar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7613?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Jiffy</a></h4>
<p><img src="https://addons.mozilla.org/img/default_icon.png" alt="" height="32" width="32" class="IFL" />Adds a new panel to Firebug for displaying timing measurements for JavaScript applications. <br class="C" /></p>
<blockquote class="publisher-comment"><p>Adds the ability to time or profile your javascript, I usually leave disabled.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/9603?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">FireRainbow</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/9603/1248403194" alt="" height="32" width="32" class="IFL" />Javascript syntax highlighting for Firebug 1.3+ <br class="C" /></p>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/7684?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">Fire.fm</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/7684/1254412991" alt="" height="32" width="32" class="IFL" />Fire.fm gives you access to the extensive music library on Last.fm. Last.fm gives free radio to the US, UK, and Germany, plus subscriber-based service to the rest of the world. Listen to your favorite music and discover new artists in the process. <br class="C" /></p>
<blockquote class="publisher-comment"><p>What would work be without free streaming music that is customizable and recommends music based on your history.  Conveniently can be added to your status bar, or your toolbar.</p>
</blockquote>
</div>
<hr class="C" />
<div class="item-info">
<h4><a href="https://addons.mozilla.org/en-US/firefox/addon/138?collection_uuid=2f6fd413%26%2345%3B1146%26%2345%3Bad49%26%2345%3B1cca%26%2345%3B84102bff60fb">StumbleUpon</a></h4>
<p><img src="https://addons.mozilla.org/en-US/firefox/images/addon_icon/138/1248392473" alt="" height="32" width="32" class="IFL" />StumbleUpon discovers web sites based on your interests, learns what you like and brings you more. <br class="C" /></p>
<blockquote class="publisher-comment"><p>StumbleUpon is great.  Very cool way to see relevant and interesting web development articles and sites.</p>
</blockquote>
</div>
<hr class="C" />
<p><a href="http://www.askapache.com/firefox/best-firefox-addons-webdev.html">Firefox Add-ons for Web Developers</a> originally appeared on AskApache.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/l-NLmItMTmCM1XJ44VlVcVNVoUs/0/da"><img src="http://feedads.g.doubleclick.net/~a/l-NLmItMTmCM1XJ44VlVcVNVoUs/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/l-NLmItMTmCM1XJ44VlVcVNVoUs/1/da"><img src="http://feedads.g.doubleclick.net/~a/l-NLmItMTmCM1XJ44VlVcVNVoUs/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.askapache.com/~ff/apache/htaccess?a=9k_EdNItqeQ:Lf7pobuk47Y:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=9k_EdNItqeQ:Lf7pobuk47Y:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=9k_EdNItqeQ:Lf7pobuk47Y:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=9k_EdNItqeQ:Lf7pobuk47Y:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=9k_EdNItqeQ:Lf7pobuk47Y:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/firefox/best-firefox-addons-webdev.html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		<feedburner:origLink>http://www.askapache.com/firefox/best-firefox-addons-webdev.html</feedburner:origLink></item>
		<item>
		<title>Optimizing Servers and Processes for Speed with ionice, nice, ulimit</title>
		<link>http://feeds.askapache.com/~r/apache/htaccess/~3/9U5RRoy_zhs/optimize-nice-ionice.html</link>
		<comments>http://www.askapache.com/linux-unix/optimize-nice-ionice.html#comments</comments>
		<pubDate>Sat, 10 Oct 2009 05:41:28 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[chrt]]></category>
		<category><![CDATA[CPU Scheduling]]></category>
		<category><![CDATA[Disk IO]]></category>
		<category><![CDATA[ionice]]></category>
		<category><![CDATA[iostat]]></category>
		<category><![CDATA[Nice]]></category>
		<category><![CDATA[optimize processes]]></category>
		<category><![CDATA[Renice]]></category>
		<category><![CDATA[servers]]></category>
		<category><![CDATA[taskset]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3167</guid>
		<description><![CDATA[<p><a href="http://www.askapache.com/linux-unix/optimize-nice-ionice.html" class="IFL"><img src="/wp-content/uploads/2009/10/nice-chart-115x74.png" alt="NICE Levels Chart" title="NICE Levels Chart" width="115" height="74" /></a>To prepare for several upcoming articles on AskApache that are focused on optimizing Servers and Sites from a server admin level, here is an article to introduce the main tools that we will be using.  These tools are used to optimize CPU time for each process using <strong>nice</strong> and <strong>renice</strong>, and other tools like <strong>ionice</strong> are used to optimize the Disk IO, or Disk speed / Disk traffic for each process.  Then you can make sure your mysqld and httpd processes are always fast and prioritized.<br class="C" /></p> ]]></description>
			<content:encoded><![CDATA[<p>Ok, sup.  I really felt I had to get this out of the way, because I have a whole stack of drafts waiting to be published, but I realized that not many people will benefit from all the advanced optimizations and tricks I&#8217;m writing unless they get a basic understanding of some of the tools I&#8217;m using.  I decided to write a series of articles explaining how I optimize servers for speed because lately I&#8217;ve been getting a lot more people wanting to hire me to do that.  I take on projects when I can but there is clearly a need out here on the net for some self-help.   The momentum is swinging more and more towards VPS type of web hosting, and I would say that 99% of those customers are getting supremely ripped off, which goes against the foundation of the web.</p>
<p>Keep in mind that this blog and my research is only a hobby of mine, my job is primarily marketing and sales, so I&#8217;m not some licensed expert or anything, or even an unlicensed expert! haha.  But it does bother me that those who are tech-savvy enough to run web-hosting companies are happily ripping people off.  So this article details the main tools that are used to speed up and optimize your machine by delegating levels of priority to specific processes.  Future articles will use these tools alot, so this is meant as an intro.</p>
<p><a id="cpu-disk-io" name="cpu-disk-io"></a></p>
<h2>CPU and Disk I/O</h2>
<p>As most of you are aware, there are 2 variables that determine any computer or programs speed.  CPU and Disk I/O.  CPU determines how fast you can process data, crunch numbers, etc. while disk I/O determines how fast your disks can read and write data to the hard-drive.  Wouldn&#8217;t it be great if you could easily configure your server to give your httpd, php, and other processes both greater CPU processing and disk IO than your non-important processes like backup scripts, ftp daemons, etc.?  We are talking about Linux in this article, so of course YES not only can you do that, you should!</p>
<p><a name="optimize-ram" id="optimize-ram"></a></p>
<h3>RAM</h3>
<p>RAM is like a hard-drive in that data is stored on it, and read/written to it.  The difference is that RAM is somewhere around 30x faster than disk I/O, but the cost of that incredible speed is that the data stored on it is only temporary in the sense that it won&#8217;t be stored permanently, it is completely erased when your machine is rebooted.  RAM is also expensive, and there is a limit to how much a server or machine can have due to hardware limits.</p>
<p><a name="optimize-swap" id="optimize-swap"></a></p>
<h3>SWAP</h3>
<p>SWAP takes off when you run out of RAM but you still want certain data to be read/write quickly.  Basically when you start running out of RAM your machine starts supplementing RAM with SWAP storage.  SWAP is usually a partition on a second hard-drive disk.  There is an upper limit on how much I/O can occur on a disk at one time, and the more I/O takes place, the slower all I/O becomes, so SWAP works well on a separate hard-drive as it will have much faster I/O.  On Windows they opted to copy the SWAP mechanism but instead use a file named pagefile.sys, and that is just one reason people in the know do not care for Windows.</p>
<p><a name="optimize-cpu" id="optimize-cpu"></a></p>
<h3>CPU</h3>
<p>So lets do this, think of your CPU (your processor) as having an amount of 100% processing available when not being used, 0% when its maxed out.  CPU&#8217;s handle multiple processing tasks simultaneously, so what we will discuss in this article is how to specify HOW MUCH of that processing amount each of your programs (heretofore &#8220;processes&#8221;) are able to use.  Yes, very very cool.</p>
<p>That is correct, you can easily configure your server to provide more of the available processing time to certain programs over others, like you can configure apache and php to utilize 50% of your CPU processing time by themselves, so that all other processes (proftpd, sshd, rsync, etc.) combined can only utilize 50%.  The terminology is we can give certain specific processes (like php.cgi, httpd, fast-cgi.cgi) a specific <strong>priority</strong>, where -19 is the most priority, and +19 is the least amount of priority, or CPU processing time.  I know it seems backwards.. </p>
<p><a id="tools" name="tools"></a></p>
<h2>The Tools</h2>
<p>If you run Windows, you are in the right place&#8230; because the following advice will save your life:  GET LINUX! Ok, now that that is out of the way, the following are the tools dicussed on this page.  All of them are free, open-source, and wonderful.  The basic idea of these tools is to control how much CPU is devoted to each process, and also how much Disk IO/Disk traffic is given to each process.</p>
<dl>
<dt><a href="#nice-tool">nice</a></dt>
<dd>run a program with modified scheduling priority</dd>
<dt><a href="#renice-tool">renice</a></dt>
<dd>alter priority of running processes</dd>
<dt><a href="#ionice-tool">ionice</a></dt>
<dd>set or retrieve the I/O priority for a given pid or execute a new task with a given I/O priority.</dd>
<dt><a href="#iostat-tool">iostat</a></dt>
<dd>Report Central Processing Unit (CPU) statistics and input/output statistics for devices and partitions.</dd>
<dt><a href="#ulimit-tool">ulimit</a></dt>
<dd>Ulimit provides control over the resources available to processes started by the shell, on systems that allow such control.</dd>
<dt><a href="#chrt-tool">chrt</a></dt>
<dd>set or retrieve real-time scheduling parameters for a given pid or execute a new task under given scheduling parameters.</dd>
<dt><a href="#taskset-tool">taskset</a></dt>
<dd>set or retrieve task CPU affinity for a given pid or execute a new task under a given affinity mask.</dd>
<dt></dt>
<dd></dd>
</dl>
<p><a id="part1-processes" name="part1-processes"></a></p>
<h2>Part 1: Process Processes Faster</h2>
<p>Ok so lets tackle figuring out how to give your response-intensive processes (like apache, php, ruby, perl, java) meaning a request to your server/machine requires a <em>response</em>.  For instance, when you requested this page that you are reading at this very second, several things on my server had to happen for you to be able to read this.</p>
<p>First your computer sends out a request to see what server the www.askapache.com domain name is.  DNS servers respond with my server IP, so for servers dedicated as nameservers, optimizing the DNS processes like bind would speed that up.  Now that your computer knows how to reach my server it sends an HTTP GET request for this url.  This request is received by the httpd process that is apache, and apache determines this url should be handled by my custom compiled php5.3.0 binary, because this page is WordPress generated.  So the php binary loads up the WordPress /index.php file, which chain-loads several other php files, including <code>wp-config.php</code> containing my MySql database settings.  Now php connects to my MySql Server to fetch this articles content, comments, title, tags, etc. and then generates the HTML and hands that back to Apache.</p>
<p>Finally, Apache generates a HTTP RESPONSE and sends the RESPONSE and CONTENT back to your Browser, which then in turn renders the page for your eyes with the necessary javascript, images, css, and other files included in the HTML response.</p>
<h3>Too much Processing</h3>
<p>Now you see why I&#8217;ve opted to write my own caching plugin that takes the php and mysql processes OUT of that equation.  Both the php binary and the mysql instance consume CPU processing, and disk IO, to load all their library files, make various network requests and sockets, check permissions, and on and on.  And that&#8217;s completely ok, the thing is, unless you configure these processes (Apache, PHP, MySQL) they will use the same amount of CPU processing that other processes use, other processes that have very little to do with you reading this sentence.  Processes to run my mail server, my FTP server, my SSH server, my cronjobs, cleanup scripts, atd daemon, etc.. and they will get the same amount of CPU!</p>
<p>Another even simpler example is what got me to look into this myself.  I wrote a shell script that created hourly, daily, weekly, and monthly backups for all of my websites and sql databases, and set it up to run by cronjob at those set intervals.  Eventually I noticed my sites were slower, my php even slower, and sometimes I even saw 503 errors that my host throws up when my server is overloaded.  The research that I pursued to prevent that from happening has been hugely eye-opening.  What does a backup script do?  Mine just created tar archives of all the files in my web root, then gzipped the tar archive saving to a backup server using scp (a file transfer using ssh).  This resulted in the following huge problems that seem to have nothing to do with a faster server and speedier website, but they have everything to with it.</p>
<ol>
<li><strong>CPU Bottleneck #1</strong> &#8211; tar and gzip use compression algorithms at a low level to create a compressed version, and all that compressing uses a whole lot of crunching &#8211; CPU processing</li>
<li><strong>DISK IO Bottleneck</strong> &#8211; Tarring the whole web root directory was creating a ton of disk io, and remember the more disk io that is going on, the less is available for everything else.</li>
<li><strong>CPU Bottleneck #2</strong> &#8211; Using scp to send my backups was security-smart, but these huge archive files had to be encrypted and sent over the net.</li>
</ol>
<p><a id="breaking-bottlenecks" name="breaking-bottlenecks"></a></p>
<h2>Breaking Bottles</h2>
<p>I apologize for being a little long-winded there, but I think it&#8217;s important to make sure everyone understands those basic concepts, which are foreign to most people.  Once you understand what is causing the bottlenecks, then you can understand the solutions, which actually are incredibly simple and even a novice linux user can easily do.  Besides, the net gets a little bit faster every time someone implements this.</p>
<p><a id="nice-tool" name="nice-tool"></a></p>
<h3>nice</h3>
<p><img src="/wp-content/uploads/2009/10/nice-chart.png" alt="NICE Levels Chart" title="NICE Levels Chart" width="351" height="225" class="IFL" />Nice allows you to run a program with modified scheduling priority which specifies how much CPU is devoted to a particular process.  Run COMMAND with an adjusted niceness, which affects process scheduling.  With no COMMAND, print the current niceness.  </p>
<p>Nicenesses range from -20 (most favorable scheduling) to 19 (least favorable).   <code>-n, &#45;-adjustment=N</code> &#8211;  add integer N to the niceness (default 10).   <code>nice +19</code> tasks get a HZ-independent 1.5%.  Running a <code>nice +10</code> and a <code>nice +11</code> task means the first will get 55% of the CPU, the other 45%.<br class="C" /></p>
<p><a id="nice-usage" name="nice-usage"></a></p>
<h4>nice usage</h4>
<pre>nice [OPTION] [COMMAND [ARG]&#46;..]
&nbsp;
-n, &#45;-adjustment=ADJUST   increment priority by ADJUST first</pre>
<p><a id="nice-examples" name="nice-examples"></a></p>
<h4>Examples of nice</h4>
<p>Using nice to download a file</p>
<pre>nice -n 17 curl -q -v -A &#039;Mozilla/5.0&#039; -L -O http://wordpress.org/latest.zip</pre>
<p>Unzipping a file with nice</p>
<pre>nice -n 17 unzip latest.zip</pre>
<p>Nice way to build from source</p>
<pre>nice -n 2 ./configure
nice -n 2 make
nice -n 2 make install</pre>
<p>It is sometimes useful to run non-interactive programs with reduced priority.</p>
<pre>$ nice factor `echo &#039;2^9 - 1&#039;|bc`
511: 7 73</pre>
<p>Since nice prints the current priority, we can invoke it through itself to demonstrate how it works: The default behavior is to reduce priority by 10.</p>
<pre> $ nice nice
10
$ nice -n 10 nice
10</pre>
<p> The ADJUSTMENT is relative to the current priority.  The first <code>nice</code> invocation runs the second one at priority 10, and it in turn runs the final one at a priority lowered by 3 more.</p>
<pre>$ nice nice -n 3 nice
13</pre>
<p>Specifying a priority larger than 19 is the same as specifying 19.</p>
<pre>$ nice -n 30 nice
19</pre>
<p>Only a privileged user may run a process with higher priority.</p>
<pre>$ nice -n -1 nice
nice: cannot set priority: Permission denied
$ sudo nice -n -1 nice
-1</pre>
<blockquote cite="/wp-content/uploads/2009/08/sched-nice-design.txt">
<p>The new scheduler in v2.6.23 addresses all three types of complaints:</p>
<p>To address the first complaint (of nice levels being not &#8220;punchy&#8221; enough), the scheduler was decoupled from &#8216;time slice&#8217; and HZ concepts (and granularity was made a separate concept from nice levels) and thus it was possible to implement better and more consistent nice +19 support: with the new scheduler nice +19 tasks get a HZ-independent 1.5%, instead of the variable 3%-5%-9% range they got in the old scheduler.</p>
<p>To address the second complaint (of nice levels not being consistent), the new scheduler makes nice(1) have the same CPU utilization effect on tasks, regardless of their absolute nice levels. So on the new scheduler, running a nice +10 and a nice 11 task has the same CPU utilization &#8220;split&#8221; between them as running a nice -5 and a nice -4 task. (one will get 55% of the CPU, the other 45%.) That is why nice levels were changed to be &#8220;multiplicative&#8221; (or exponential) &#8211; that way it does not matter which nice level you start out from, the &#8216;relative result&#8217; will always be the same.</p>
<p>The third complaint (of negative nice levels not being &#8220;punchy&#8221; enough and forcing audio apps to run under the more dangerous SCHED_FIFO scheduling policy) is addressed by the new scheduler almost automatically: stronger negative nice levels are an automatic side-effect of the recalibrated dynamic range of nice levels.</p>
</blockquote>
<p><a id="renice-tool" name="renice-tool"></a></p>
<h3>renice</h3>
<p>Renice is similar to the nice command, but it lets you modify the nice of a currently running process.  This is nice for shell scripts where you can add this to the top of the script to nicify the whole script to 19.</p>
<p><a id="renice-usage" name="renice-usage"></a></p>
<h4>renice usage</h4>
<pre>renice priority [ [ -p ] pids ] [ [ -g ] pgrps ] [ [ -u ] users ]
&nbsp;
-g      Force who parameters to be interpreted as process group ID&#039;s.
-u      Force the who parameters to be interpreted as user names.
-p      Resets the who interpretation to be (the default) process ID&#039;s.</pre>
<p><a id="renice-examples" name="renice-examples"></a></p>
<h4>Examples of renice</h4>
<p>From the shell, changes the priority of the shell and all children to 19.  From a shell script, does the same but only for the script and its children.</p>
<pre>renice 19 -p $$</pre>
<p>This runs renice without any output</p>
<pre>renice 19 -p $$ &&gt;/dev/null</pre>
<p>10 gets more CPU than 19</p>
<pre>renice 10 -p $$</pre>
<p>change the priority of process ID&#8217;s 987 and 32, and all processes owned by users daemon and root.</p>
<pre>renice +1 987 -u daemon root -p 32</pre>
<p><a id="part2-disk-io" name="part2-disk-io"></a></p>
<h2>Part 2: Optimizing Disk I/O</h2>
<p><a id="scheduling-policies" name="scheduling-policies"></a></p>
<h3>Linux Scheduling Policies</h3>
<p>The scheduler is the kernel component that decides which runnable process will be executed by the CPU next.  Each process has an associated scheduling policy and a static scheduling priority, sched_priority</p>
<p>Processes scheduled under one of the real-time policies (SCHED_FIFO, SCHED_RR) have a sched_priority value in the <strong>range 1 (low) to 99 (high)</strong>.  (As the numbers imply, real-time processes always have higher priority than normal processes.)   The following &#8220;real-time&#8221; policies are also supported, for special time-critical applications that need precise control over the way in which runnable processes are selected for execution:</p>
<p>Currently, Linux supports the following &#8220;normal&#8221; (i.e., non-real-time) scheduling policies:</p>
<dl>
<dt><strong>SCHED_OTHER</strong>: Default Linux time-sharing scheduling</dt>
<dd>The standard round-robin time-sharing policy</dd>
<dt><strong>SCHED_BATCH</strong>: Scheduling batch processes</dt>
<dd>This policy is useful for workloads that are non-interactive, but do not want to lower their nice value, and for workloads that want a deterministic scheduling policy without interactivity causing extra preemptions (between the workload&#8217;s tasks).</dd>
<dt><strong>SCHED_IDLE</strong>: Scheduling very low priority jobs</dt>
<dd>This policy is intended for running jobs at extremely low priority (lower even than a +19 nice value with the SCHED_OTHER or SCHED_BATCH policies)</dd>
<dt><strong>SCHED_FIFO</strong>: First In-First Out scheduling</dt>
<dd>A first-in, first-out policy</dd>
<dt><strong>SCHED_RR</strong>: Round Robin scheduling</dt>
<dd>A round-robin policy.</dd>
</dl>
<p><a id="scheduling-classes" name="scheduling-classes"></a></p>
<h3>Scheduling Classes</h3>
<dl>
<dt><code>IOPRIO_CLASS_RT</code></dt>
<dd>This is the realtime io class. The RT scheduling class is given first access to the disk, regardless of what else is going on in the system. Thus the RT class needs to be used with some care, as it can starve other processes. As with the best effort class, 8 priority levels are defined denoting how big a time slice a given process will receive on each scheduling window.  This scheduling class is given higher priority than any other in the system, processes from this class are given first access to the disk every time. Thus it needs to be used with some care, one io RT process can starve the entire system. Within the RT class, there are 8 levels of class data that determine exactly how much time this process needs the disk for on each service. In the future this might change to be more directly mappable to performance, by passing in a wanted data rate instead.</dd>
<dt><code>IOPRIO_CLASS_BE</code></dt>
<dd>This is the best-effort scheduling class, which is the default for any process that hasn&#8217;t set a specific io priority. This is the default scheduling class for any process that hasn&#8217;t asked for a specific io priority. Programs inherit the CPU nice setting for io priorities. This class takes a priority argument from 0-7, with lower number being higher priority. Programs running at the same best effort priority are served in a round-robin fashion.  The class data determines how much io bandwidth the process will get, it&#8217;s directly mappable to the cpu nice levels just more coarsely implemented. 0 is the highest BE prio level, 7 is the lowest. The mapping between cpu nice level and io nice level is determined as: io_nice = (cpu_nice + 20) / 5.</dd>
<dt><code>IOPRIO_CLASS_IDLE</code></dt>
<dd>This is the idle scheduling class, processes running at this level only get io time when no one else needs the disk. A program running with idle io priority will only get disk time when no other program has asked for disk io for a defined grace period. The impact of idle io processes on normal system activity should be zero. This scheduling class does not take a priority argument.    The idle class has no class data, since it doesn&#8217;t really apply here.</dd>
</dl>
<p><a id="ionice-tool" name="ionice-tool"></a></p>
<h3>ionice</h3>
<p>ionice &#8211; get/set program io scheduling class and priority.  This program sets the io scheduling class and priority for a program.  Since v3 (aka CFQ Time Sliced) CFQ implements I/O nice levels similar to those of CPU scheduling. These nice levels are grouped in three scheduling classes each one containing one or more priority levels:</p>
<p><a id="ionice-usage" name="ionice-usage"></a></p>
<h4>ionice usage</h4>
<p>If no arguments or just -p is given, ionice will query the current io scheduling class and priority for that process.</p>
<pre>ionice [-c] [-n] [-p] [COMMAND [ARG&#46;..]]</pre>
<ul>
<li><strong>-c</strong> &#8211; The scheduling class. 1 for real time, 2 for best-effort, 3 for idle.</li>
<li><strong>-n</strong> &#8211; The scheduling class data. This defines the class data, if the class accepts an argument. For real time and best-effort, 0-7 is valid data.</li>
<li><strong>-p</strong> &#8211; Pass in a process pid to change an already running process. If this argument is not given, ionice will run the listed program with the given parameters.</li>
</ul>
<p><a id="ionice-examples" name="ionice-examples"></a></p>
<h4>ionice Examples</h4>
<p>Sets process with PID 89 as an idle io process.</p>
<pre>ionice -c3 -p89</pre>
<p>Runs &#8216;bash&#8217; as a best-effort program with highest priority.</p>
<pre>ionice -c2 -n0 bash</pre>
<p>Returns the class and priority of the process with PID 89</p>
<pre>ionice -p89</pre>
<blockquote cite="http://gaarai.com/2009/03/06/multitasking-from-the-linux-command-line-plus-process-prioritization/">
<p>
<p>With the ionice command, you can set the IO priority for a process to one of three classes: Idle (3), Best Effort (2), and Real Time (1). The Idle class means that the process will only be able to read and write to the disk when all other processes are not using the disk. The Best Effort class is the default and has eight different priority levels from 0 (top priority) to 7 (lowest priority). The Real Time class results in the process having first access to the disk irregardless of other process and should never be used unless you know what you are doing.</p>
<p>If we wish to run the updatedb process in the background with an Idle IO class priority, we can run the following:</p>
<pre>
$ sudo date
$ sudo updatedb &#038;
[1] 16324
$ sudo ionice -c3 -p16324
</pre>
<p>If we’d rather just lower the Best Effort class priority (defaults to 4) for the command so the process isn’t limited to idle IO periods, we can run the following:</p>
<pre>
$ sudo date
$ sudo updatedb &#038;
[1] 16324
$ sudo ionice -c2 -n7 -p16324
</pre>
<p>Again, the Real Time class should not be used as it can prevent you from being able to interact with your system.</p>
<p>You may wonder where you can get the process ID if you don’t know it, can’t remember it, or didn’t start the process (an automatted script may have launched it). You can find process IDs with the ps command.</p>
<p>For example, if I had an updatedb program running in the background, and I wanted to find its process ID, I can run the following:</p>
<pre>
$ ps -C updatedb
PID TTY TIME CMD
4234 ? 00:00:42 updatedb
</pre>
<p>This tells me that the process’ process ID (PID) is 4234.</p>
</p>
</blockquote>
<p><a id="iostat-tool" name="iostat-tool"></a></p>
<h3>iostat</h3>
<p><a id="iostat-usage" name="iostat-usage"></a></p>
<h4>iostat Usage</h4>
<pre>iostat [ -c ] [ -d ] [ -N ] [ -n ] [ -h ] [ -k | -m ] [ -t ] [ -V ] [ -x ] [ -z ] [ &lt;device&gt; [&#46;..] | ALL ] [ -p [ &lt;device&gt; [,&#46;..] | ALL ] ] [ &lt;interval&gt; [ &lt;count&gt; ] ]

-c     The -c option is exclusive of the -d option and displays only the CPU usage report.
-d     The -d option is exclusive of the -c option and displays only the device utilization report.
-k     Display statistics in kilobytes per second instead of blocks per second.  Data displayed are valid only with kernels 2.4 and newer.
-m     Display statistics in megabytes per second instead of blocks or kilobytes per second.  Data displayed are valid only with kernels 2.4 and newer.
-n     Displays the NFS-directory statistic.  Data displayed are valid only with kernels 2.6.17 and newer.  This option is exclusive ot the -x option.
-h     Display the NFS report more human readable.
-p [ { device | ALL } ]   The  -p  option  is  exclusive  of  the -x option and displays statistics for block devices and all their partitions that are used by the system.
-t     Print the time for each report displayed.
-x     Display extended statistics.
</pre>
<p><a id="iostat-examples" name="iostat-examples"></a></p>
<h4>iostat Examples</h4>
<pre>iostat -p ALL 2 1000
avg-cpu:  %user   %nice    %sys %iowait   %idle
            8.34    0.08    1.26    2.27   88.05
</pre>
<p>Display a single history since boot report for all CPU and Devices.</p>
<pre>$ iostat</pre>
<p>Display a continuous device report at two second intervals.</p>
<pre>$ iostat -d 2</pre>
<p>Display six reports at two second intervals for all devices.</p>
<pre>$ iostat -d 2 6</pre>
<p>Display six reports of extended statistics at two second intervals for devices hda and hdb.</p>
<pre>$ iostat -x hda hdb 2 6</pre>
<p>Display six reports at two second intervals for device sda and all its partitions (sda1, etc.)</p>
<pre>$ iostat -p sda 2 6</pre>
<p><a id="schedule-utils" name="schedule-utils"></a></p>
<h2>Schedule Utils</h2>
<p>These are the Linux scheduler utilities &#8211; schedutils for short.  These programs take advantage of the scheduler family of syscalls that Linux implements across various kernels.  These system calls implement interfaces for scheduler-related parameters such as CPU affinity and real-time attributes.  The standard UNIX utilities do not provide support for these interfaces &#8212; thus this package.</p>
<p>The programs that are included in this package are chrt and taskset.  Together with nice and renice (not included), they allow full control of process scheduling parameters.  Suggestions for related utilities are welcome, although it is believed (barring new interfaces) that all scheduling interfaces are covered.</p>
<p>I&#8217;ve found that quite a few servers do not have this package installed, indicating to you that they might not know what they are doing.  Here is how you can install this incredible package, for non-root users.  Root users know how to do this, or they shouldn&#8217;t be root.  Download and install in 1 line provided you have curl.  Or just use the following commands.</p>
<pre>mkdir -pv $HOME/{dist,source,bin,share/man/man1} &#038;&#038; cd ~/dist &#038;&#038; curl -O http://ftp.de.debian.org/debian/pool/main/s/schedutils/schedutils_1.5.0.orig.tar.gz &#038;&#038; cd ~/source &#038;&#038; tar -xvzf ~/dist/sch*z &#038;&#038; cd sch* &#038;&#038; sed -i -e &#039;s,= /usr/local,=${HOME},g&#039; Makefile &#038;&#038; make &#038;&#038; make install &#038;&#038; make installdoc</pre>
<pre>
mkdir -pv $HOME/{dist,source,bin,share/man/man1}
cd ~/dist &#038;&#038; curl -O http://ftp.de.debian.org/debian/pool/main/s/schedutils/schedutils_1.5.0.orig.tar.gz
cd ~/source &#038;&#038; tar -xvzf ~/dist/schedutils_1.5.0.orig.tar.gz
cd ~/source/schedutils-1.5.0 &#038;&#038; sed -i -e &#039;s,= /usr/local,=${HOME},g&#039; Makefile
make || make -d &#038;&#038; make install || make install -d &#038;&#038; make installdoc || make installdoc -d
</pre>
<p><a id="taskset-tool" name="taskset-tool"></a></p>
<h3>taskset</h3>
<p>Taskset  is  used to set or retrieve the CPU affinity of a running process given its PID or to launch a new COMMAND with a given CPU affinity.  CPU affinity is a scheduler property that &#8220;bonds&#8221; a process to a given set of CPUs on the system.  The Linux scheduler will honor the given CPU affinity and the process will not run on any other CPUs.  Note that the Linux scheduler also supports natural CPU affinity: the scheduler attempts to keep processes on the same CPU as long as practical for performance reasons.  Therefore, forcing a specific CPU affinity is useful only in certain applications.</p>
<p>The  CPU  affinity is represented as a bitmask, with the lowest order bit corresponding to the first logical CPU and the highest order bit corresponding to the last logical CPU.  Not all CPUs may exist on a given system but a mask may specify more CPUs than are present.  A retrieved mask will reflect only the bits that correspond to CPUs physically on the system.  If an invalid mask is given (i.e., one that corresponds to no valid CPUs on the current system) an error is returned.  A user must possess CAP_SYS_NICE to change the CPU affinity of a process.  Any user can retrieve the affinity mask.</p>
<p><a id="taskset-usage" name="taskset-usage"></a></p>
<h4>taskset Usage</h4>
<pre>taskset [options] [mask | cpu-list] [pid | cmd [args&#46;..]]
&nbsp;
-p, &#45;-pid            operate on existing given pid
-c, &#45;-cpu-list     display and specify cpus in list format</pre>
<p><a id="taskset-examples" name="taskset-examples"></a></p>
<h4>taskset-examples</h4>
<p>The default behavior is to run a new command:</p>
<pre>$ taskset 03 sshd -b 1024</pre>
<p>You can retrieve the mask of an existing task or set it:</p>
<pre>$ taskset -p 700
$ taskset -p 03 700</pre>
<p>List format uses a comma-separated list instead of a mask:</p>
<pre>$ taskset -pc 0,3,7-11 700</pre>
<p><a id="chrt-tool" name="chrt-tool"></a></p>
<h3>chrt</h3>
<p><code>chrt</code> sets or retrieves the real-time scheduling attributes of an existing PID or runs COMMAND with the given attributes.  Both policy (one of <code>SCHED_FIFO</code>, <code>SCHED_RR</code>, or <code>SCHED_OTHER</code>) and priority can be set and retrieved.  A user must possess CAP_SYS_NICE to change the scheduling attributes of a process.  Any user can retrieve the scheduling information.</p>
<p><a id="chrt-usage" name="chrt-usage"></a></p>
<h4>chrt Usage</h4>
<pre>chrt [options] [prio] [pid | cmd [args&#46;..]]
&nbsp;
-p, &#45;-pid operate on an existing PID and do not launch a new task
-f, &#45;-fifo set scheduling policy to SCHED_FIFO
-m, &#45;-max show minimum and maximum valid priorities, then exit
-o, &#45;-other set policy scheduling policy to SCHED_OTHER
-r, &#45;-rr set scheduling policy to SCHED_RR (the default)
</pre>
<p><a id="chrt-examples" name="chrt-examples"></a></p>
<h4>chrt Examples</h4>
<p>The default behavior is to run a new command:   <code>chrt [prio] &#45;- [command] [arguments]</code></p>
<p>You can also retrieve the real-time attributes of an existing task:</p>
<pre>chrt -p [pid]</pre>
<p>Or set them:</p>
<pre>chrt -p [prio] [pid]</pre>
<p><a id="ulimit-tool" name="ulimit-tool"></a></p>
<h2>ulimit &#8211; get and set user limits</h2>
<p>Ulimit provides control over the resources available to processes started by the shell, on systems that allow such control. One can set the resource limits of the shell using the built-in ulimit command.  The shell&#8217;s resource limits are inherited by the processes that it creates to execute commands.</p>
<p><a id="ulimit-usage" name="ulimit-usage"></a></p>
<h4>ulimit Usage</h4>
<pre>ulimit [-SHacdfilmnpqstuvx] [limit]</pre>
<dl>
<dt>-S</dt>
<dd>use the `soft&#8217; resource limit</dd>
<dt>-H</dt>
<dd>use the `hard&#8217; resource limit</dd>
<dt>-a</dt>
<dd>all current limits are reported</dd>
<dt>-c</dt>
<dd>the maximum size of core files created</dd>
<dt>-d</dt>
<dd>the maximum size of a process&#8217;s data segment</dd>
<dt>-f</dt>
<dd>the maximum size of files created by the shell</dd>
<dt>-l</dt>
<dd>the maximum size a process may lock into memory</dd>
<dt>-m</dt>
<dd>the maximum resident set size</dd>
<dt>-n</dt>
<dd>the maximum number of open file descriptors</dd>
<dt>-p</dt>
<dd>the pipe buffer size</dd>
<dt>-s</dt>
<dd>the maximum stack size</dd>
<dt>-t</dt>
<dd>the maximum amount of cpu time in seconds</dd>
<dt>-u</dt>
<dd>the maximum number of user processes</dd>
<dt>-v</dt>
<dd>the size of virtual memory</dd>
</dl>
<p>If LIMIT is given, it is the new value of the specified resource; the special LIMIT values `soft&#8217;, `hard&#8217;, and `unlimited&#8217; stand for the current soft limit, the current hard limit, and no limit, respectively.  Otherwise, the current value of the specified resource is printed.  If no option is given, then -f is assumed.  Values are in 1024-byte increments, except for -t, which is in seconds, -p, which is in increments of 512 bytes, and -u, which is an unscaled number of processes.</p>
<dl>
<dt>RLIMIT_AS</dt>
<dd>The maximum size of the process&#8217;s virtual memory (address space) in bytes.  This limit affects calls to brk(2), mmap(2) and mremap(2), which fail with the error ENOMEM upon exceeding this limit.  Also automatic stack expansion will fail (and generate a SIGSEGV that kills the process if no alternate stack has been made available via sigaltstack(2)).  Since the value is a long, on machines with a 32-bit long either this limit is at most 2 GiB, or this resource is unlimited.</dd>
<dt>RLIMIT_CORE</dt>
<dd>Maximum size of core file.  When 0 no core dump files are created. When non-zero, larger dumps are truncated to this size.</dd>
<dt>RLIMIT_CPU CPU</dt>
<dd>time limit in seconds.  When the process reaches the soft limit, it is sent a SIGXCPU signal.  The default action for this signal is to terminate the process.  However, the signal can be caught, and the handler can return control to the main program.  If the process continues to consume CPU time, it will be sent SIGXCPU once per second until the hard limit is reached, at which time it is sent SIGKILL. (This latter point describes Linux 2.2 through 2.6 behavior. Implementations vary in how they treat processes which continue to consume CPU time after reaching the soft limit.  Portable applications that need to catch this signal should perform an orderly termination upon first receipt of SIGXCPU.)</dd>
<dt>RLIMIT_DATA</dt>
<dd>The maximum size of the process&#8217;s data segment (initialized data, uninitialized data, and heap).  This limit affects calls to brk(2) and sbrk(2), which fail with the error ENOMEM upon encountering the soft limit of this resource.</dd>
<dt>RLIMIT_FSIZE</dt>
<dd>The maximum size of files that the process may create.  Attempts to extend a file beyond this limit result in delivery of a SIGXFSZ signal. By default, this signal terminates a process, but a process can catch this signal instead, in which case the relevant system call (e.g., write(2), truncate(2)) fails with the error EFBIG.</dd>
<dt>RLIMIT_LOCKS</dt>
<dd>(Early Linux 2.4 only) A limit on the combined number of flock(2) locks and fcntl(2) leases that this process may establish.</dd>
<dt>RLIMIT_MEMLOCK</dt>
<dd>The maximum number of bytes of memory that may be locked into RAM.  In effect this limit is rounded down to the nearest multiple of the system page size.  This limit affects mlock(2) and mlockall(2) and the mmap(2) MAP_LOCKED operation.  Since Linux 2.6.9 it also affects the shmctl(2) SHM_LOCK operation, where it sets a maximum on the total bytes in shared memory segments (see shmget(2)) that may be locked by the real user ID of the calling process.  The shmctl(2) SHM_LOCK locks are accounted for separately from the per-process memory locks established by mlock(2), mlockall(2), and mmap(2) MAP_LOCKED; a process can lock bytes up to this limit in each of these two categories.  In Linux kernels before 2.6.9, this limit controlled the amount of memory that could be locked by a privileged process.  Since Linux 2.6.9, no limits are placed on the amount of memory that a privileged process may lock, and this limit instead governs the amount of memory that an unprivileged process may lock.</dd>
<dt>RLIMIT_MSGQUEUE</dt>
<dd>(Since Linux 2.6.8) Specifies the limit on the number of bytes that can be allocated for POSIX message queues for the real user ID of the calling process.  This limit is enforced for mq_open(3).  Each message queue that the user creates counts (until it is removed) against this limit according to the formula:  <code>bytes = attr.mq_maxmsg * sizeof(struct msg_msg *) +             attr.mq_maxmsg * attr.mq_msgsize</code> where attr is the mq_attr structure specified as the fourth argument to mq_open(3).  The first addend in the formula, which includes sizeof(struct msg_msg *) (4 bytes on Linux/i386), ensures that the user cannot create an unlimited number of zero-length messages (such messages nevertheless each consume some system memory for bookkeeping overhead).</dd>
<dt>RLIMIT_NICE</dt>
<dd>(since Linux 2.6.12, but see BUGS below) Specifies a ceiling to which the process&#8217;s nice value can be raised using setpriority(2) or nice(2).  The actual ceiling for the nice value is calculated as 20 &#8211; rlim_cur.  (This strangeness occurs because negative numbers cannot be specified as resource limit values, since they typically have special meanings.  For example, RLIM_INFINITY typically is the same as -1.)</dd>
<dt>RLIMIT_NOFILE</dt>
<dd>Specifies a value one greater than the maximum file descriptor number that can be opened by this process.  Attempts (open(2), pipe(2), dup(2), etc.)  to exceed this limit yield the error EMFILE. (Historically, this limit was named RLIMIT_OFILE on BSD.)</dd>
<dt>RLIMIT_NPROC</dt>
<dd>The maximum number of processes (or, more precisely on Linux, threads) that can be created for the real user ID of the calling process.  Upon encountering this limit, fork(2) fails with the error EAGAIN.</dd>
<dt>RLIMIT_RSS</dt>
<dd>Specifies the limit (in pages) of the process&#8217;s resident set (the number of virtual pages resident in RAM).  This limit only has effect in Linux 2.4.x, x < 30, and there only affects calls to madvise(2) specifying MADV_WILLNEED.</dd>
<dt>RLIMIT_RTPRIO</dt>
<dd>(Since Linux 2.6.12, but see BUGS) Specifies a ceiling on the real-time priority that may be set for this process using sched_setscheduler(2) and sched_setparam(2).</dd>
<dt>RLIMIT_RTTIME</dt>
<dd>(Since Linux 2.6.25) Specifies a limit on the amount of CPU time that a process scheduled under a real-time scheduling policy may consume without making a blocking system call.  For the purpose of this limit, each time a process makes a blocking system call, the count of its consumed CPU time is reset to zero.  The CPU time count is not reset if the process continues trying to use the CPU but is preempted, its time slice expires, or it calls sched_yield(2). Upon reaching the soft limit, the process is sent a SIGXCPU signal.  If the process catches or ignores this signal and continues consuming CPU time, then SIGXCPU will be generated once each second until the hard limit is reached, at which point the process is sent a SIGKILL signal.  The intended use of this limit is to stop a runaway real-time process from locking up the system.</dd>
<dt>RLIMIT_SIGPENDING</dt>
<dd>(Since Linux 2.6.8) Specifies the limit on the number of signals that may be queued for the real user ID of the calling process.  Both standard and real-time signals are counted for the purpose of checking this limit.  However, the limit is only enforced for sigqueue(2); it is always possible to use kill(2) to queue one instance of any of the signals that are not already queued to the process.</dd>
<dt>RLIMIT_STACK</dt>
<dd>The maximum size of the process stack, in bytes.  Upon reaching this limit, a SIGSEGV signal is generated.  To handle this signal, a process must employ an alternate signal stack (sigaltstack(2)).</dd>
</dl>
<p><a id="ulimit-examples" name="ulimit-examples"></a></p>
<h4>ulimit Examples</h4>
<p>Turn off core dumps</p>
<pre>ulimit -S -c 0</pre>
<h2>More Reading</h2>
<ul>
<li>Please see the <a href="http://pagesperso-orange.fr/sebastien.godard/">SYSSTAT Utilities Home for more performance monitoring tools</a> like sar, sadf, mpstat, iostat, pidstat and sa tools.</li>
<li><a href="http://gaarai.com/2009/03/06/multitasking-from-the-linux-command-line-plus-process-prioritization/">Multitasking from the Linux Command Line + Process Prioritization</a></li>
</ul>
<h2>Man Pages</h2>
<ol>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man2/sched_setscheduler.2.html">sched_setscheduler</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man7/cpuset.7.html">cpuset</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man7/signal.7.html">signal</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man2/getrlimit.2.html">getrlimit</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man3/ulimit.3.html">ulimit</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man2/ioprio_get.2.html">ioprio_get</a></li>
<li><a href="http://www.kernel.org/doc/man-pages/online/pages/man2/ioprio_set.2.html">ioprio_set</a></li>
</ol>
<h2>Kernel Documentation</h2>
<ul>
<li><a href='/wp-content/uploads/2009/08/sched-stats.txt'>information on schedstats (Linux Scheduler Statistics)</a></li>
<li><a href='/wp-content/uploads/2009/08/sched-rt-group.txt'>real-time group scheduling</a></li>
<li><a href='/wp-content/uploads/2009/08/sched-nice-design.txt'>How and why the scheduler&#8217;s nice levels are implemented</a></li>
<li><a href='/wp-content/uploads/2009/08/sched-domains.txt'>information on scheduling domains</a></li>
<li><a href='/wp-content/uploads/2009/08/sched-design-CFS.txt'>goals, design and implementation of the Complete Fair Scheduler</a></li>
</ul>
<h2>Future Discussions:</h2>
<p><a href="http://www.cuddletech.com/blog/pivot/entry.php?id=820">IO Benchmarking: How, Why and With What</a></p>
<p><a href="http://www.askapache.com/linux-unix/optimize-nice-ionice.html">Optimizing Servers and Processes for Speed with ionice, nice, ulimit</a> originally appeared on AskApache.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/pHJsbI0IcFPMqe1jXGfbMnz691o/0/da"><img src="http://feedads.g.doubleclick.net/~a/pHJsbI0IcFPMqe1jXGfbMnz691o/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/pHJsbI0IcFPMqe1jXGfbMnz691o/1/da"><img src="http://feedads.g.doubleclick.net/~a/pHJsbI0IcFPMqe1jXGfbMnz691o/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.askapache.com/~ff/apache/htaccess?a=9U5RRoy_zhs:vs0R93PpAMA:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=9U5RRoy_zhs:vs0R93PpAMA:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=9U5RRoy_zhs:vs0R93PpAMA:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=9U5RRoy_zhs:vs0R93PpAMA:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=9U5RRoy_zhs:vs0R93PpAMA:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/linux-unix/optimize-nice-ionice.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.askapache.com/linux-unix/optimize-nice-ionice.html</feedburner:origLink></item>
		<item>
		<title>Windows Optimization – Intense Part II</title>
		<link>http://feeds.askapache.com/~r/apache/htaccess/~3/lsZiZjPcUUs/defrag-optimize-speed-xp.html</link>
		<comments>http://www.askapache.com/windows/defrag-optimize-speed-xp.html#comments</comments>
		<pubDate>Mon, 05 Oct 2009 13:42:28 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Review]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Defrag]]></category>
		<category><![CDATA[Defragmentation]]></category>
		<category><![CDATA[Deframenting]]></category>
		<category><![CDATA[Disk IO]]></category>
		<category><![CDATA[MyDefrag]]></category>
		<category><![CDATA[PageDefrag]]></category>
		<category><![CDATA[Registry Optimization]]></category>
		<category><![CDATA[SpinRite]]></category>
		<category><![CDATA[UltraDefrag]]></category>
		<category><![CDATA[Windows XP]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3039</guid>
		<description><![CDATA[<p><a href="http://www.askapache.com/windows/defrag-optimize-speed-xp.html" class="IFL"><img src="/wp-content/uploads/2009/10/HDTune_Benchmark-116x94.gif" alt="HDTune_Benchmark" title="HDTune_Benchmark" width="116" height="94" class="alignnone size-thumbnail wp-image-3425" /></a>If you ever wanted to know the best way to defragment and speed up your Windows-Based PC, I mean you <em>really</em> wanted to know, here is the 2nd part to my article on Windows Speed Optimizing that details the process I have found works really well.  Definately not a quick process, and certainly not the best ever, just my best ever and one that you only have to do once to get the benefits.  
This article has a lot of incredibly useful (and FREE) tools I recommend, which you can grab and use without reading the article..<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p>This is part 2 of my Windows XP Optimization article:  <a href="http://www.askapache.com/windows/blazing-fast-xp-speed.html">Make Windows XP Blazingly Fast</a>.</p>
<p>The first article was meant as a <a href="http://www.askapache.com/windows/blazing-fast-xp-speed.html">detailed and thorough introduction to speeding up Windows-based PC&#8217;s</a> in a way that makes it easy to follow, without getting too specific.  So make sure you read that first, and pay the most attention to freeing up RAM, CPU, and Disk IO speed by reducing the number of services and processes that are running, we will deal with defragmentation, hard-drive speed, Disk IO, Prefetching, and Pagefile/Registry Defragmentation now.</p>
<p>This article has some really really really great stuff for ya.  It shows which tools (all but one completely free) are the best and you will use them for a long time, they are all very good.  That is just a side benefit, as this article is really more of a step-by-step guide to optimizing your system that won&#8217;t have to be repeated for at least a year.  The result of course is a much more responsive PC.</p>
<h2>Whats New</h2>
<p>After writing that article I continued my research and testing into the subject on my personal computers.  I wanted to test out several additional programs and methods before I wrote about them for you guys, and I found a few really sweet additions that had a very big performance gain for all my computers, from my oldest and slowest PC&#8217;s to my new 4K power laptop.  This article is primarily focused on optimizing your hard drive data and improving your Disk IO speed, and you will definately see an improvement in speed.  It doesn&#8217;t get REALLY good until the defragmenting section..</p>
<ol>
<li><a href="#optimize-hard-drive">Clean Up Hard Drive</a> &#8211; Removing unneccessary files</li>
<li><a href="#registry-cleaning">Clean Registry</a> &#8211; Fixing slow registry problems automatically</li>
<li><a href="#defragmenting">Ultimate Defragmenting</a> &#8211; The best defrag method I use</li>
<li><a href="#optimize-disk">Optimize Physical Hard Disk</a> &#8211; Final step that cleans and heals your physical disk</li>
</ol>
<hr class="C" />
<p><a id="optimize-hard-drive" name="optimize-hard-drive"></a></p>
<h2>Clean Up Hard Drive</h2>
<p>The first step is to clean up all the extra, temporary, and unneccessary files cluttering your hard-drive.  The reason is because we will be defragmenting your hard-drive like its never been defragged before, then we are going to go over every single bit and byte of your hard-drive to optimize the physical sectors and storage of your data..   Also we will be running a check of your registry and cleaning out bad links and other slow errors, so get it as clutter-free as possible.  DON&#8217;T use Windows built-in folder compression, it makes defragmentation worse&#8230; DO use 7-zip or winrar to create a solid archive file of any misc directories with a bunch of files&#8230; You only need one program to clean your system.</p>
<h3>CCleaner</h3>
<p><a class="ccleaner ccl1 IFL" href="/wp-content/uploads/2009/10/screen_301.png" title="CCleaner main program window open on the Windows tab"></a>CCleaner is a Small, Fast and Free software that removes unused and temporary files from your system and allows Windows to run faster, more efficiently and gives you more hard disk space.  I&#8217;ve now been using it for several months and love it.  As well as cleaning up old files and settings left by standard Windows components, CCleaner also cleans temporary files and recent file lists for many applications. Including: Firefox, Opera, Safari, Media Player, eMule, Kazaa, Google Toolbar, Netscape, Microsoft Office, Nero, Adobe Acrobat Reader, WinRAR, WinAce, WinZip and more&#8230; Google Chrome, Opera, Safari, etc..<br class="C" /></p>
<ul>
<li>Recycle Bin, Clipboard</li>
<li>Windows Temporary files, Windows Log files, Chkdsk file fragments</li>
<li>Recent Documents (on the Start Menu), Run history (on the Start Menu)</li>
<li>Windows XP Search Assistant history, old Prefetch data, Windows memory dumps after crashes</li>
</ul>
<p><a href="http://www.ccleaner.com/download">Download CCleaner</a><br class="C" /></p>
<hr class="C" />
<p><a id="registry-cleaning" name="registry-cleaning"></a></p>
<h2>Registry Cleaning</h2>
<p>The registry is Windows biggest mistake, (although I&#8217;m sure they like it), and basically holds all the information for your programs and Windows.  Things like the size of your windows, recent file lists, icon files for different icons, etc..  I&#8217;ve never seen a computer that didn&#8217;t have some registry issues, so this needs to be cleaned and may have a huge impact on your speed.  Real quickly, here are some programs to backup and restore your registry, optimize and defrag your registry, and finally search and clean any errors in your registry.</p>
<h3>CCleaner</h3>
<p><a class="ccleaner ccl3 IFL" href="/wp-content/uploads/2009/10/screen_303.png" title="CCleaner Issue Scanning section with the results of a scan"></a>Yup!  CCleaner also takes care of most of the performance issues of your registry.  It&#8217;s very safe and fast.  CCleaner uses an advanced Registry Cleaner to check for problems and inconsistencies. It checks the following:<br class="C" /></p>
<ul>
<li>ClassIDs, ProgIDs, Application Paths, Icons</li>
<li>Uninstallers, Shared DLLs, Fonts, Help File references</li>
<li>File Extensions, ActiveX Controls, Invalid Shortcuts and more&#8230;</li>
</ul>
<p><a href="http://www.ccleaner.com/download">Download CCleaner</a><br class="C" /></p>
<h3>ERUNT &#8211; The Emergency Recovery Utility NT</h3>
<p><img class="IFL" src="/wp-content/uploads/2009/10/erunt.gif" alt="ERUNT – Registry Backup and Restore Emergency Recovery Utility for Windows" title="ERUNT – Registry Backup and Restore Emergency Recovery Utility for Windows" width="32" height="32" /><a href="http://www.larshederer.homepage.t-online.de/erunt/index.htm">ERUNT</a> is a Registry Backup and Restore utility for Windows NT/2000/2003/XP.  I use this to backup my registry automatically or on command.. Ive used it for years and it&#8217;s always good to backup before you do anything.<br class="C" /></p>
<pre>
# Here&#039;s the command I use (only for advanced users familiar with autoback)
"%ProgramFiles%\ERUNT\AUTOBACK.EXE" %SystemRoot%\ERDNT\#Date# sysreg curuser otherusers /noconfirmdelete /noprogresswindow /days:45 /alwayscreate
</pre>
<p><a href="http://www.larshederer.homepage.t-online.de/erunt/">Download ERUNT</a> &middot; (<a href="http://www.larshederer.homepage.t-online.de/erunt/erunt.txt">Details</a>)<br class="C" /></p>
<h3>NTGREGOPT &#8211; NT Registry Optimizer</h3>
<p><img class="IFL" src="/wp-content/uploads/2009/10/ntregopt.gif" alt="NTGREGOPT – NT Registry Optimizer for Windows" title="NTGREGOPT – NT Registry Optimizer for Windows" width="32" height="32" /><a href="http://www.larshederer.homepage.t-online.de/erunt/index.htm">NTGREGOPT</a> is a Registry Optimization tool for Windows NT/2000/2003/XP/Vista that minimizes the size of your registry files by simply compacting the registry hives to the minimum size possible.</p>
<p>Registry files in an NT-based system can become fragmented over time, occupying more space on your hard disk than necessary and decreasing overall performance. You should use the NTREGOPT utility regularly, but especially after installing or uninstalling a program, to minimize the size of the registry files and optimize registry access.  The program works by recreating each registry hive &#8220;from scratch&#8221;, thus removing any slack space that may be left from previously modified or deleted keys.  It does NOT change the contents of the registry in any way, nor does it physically defrag the registry files on the drive.  I recommend using this once every couple weeks.  I scheduled it to run automatically.<br class="C" /></p>
<p><a href="http://www.larshederer.homepage.t-online.de/erunt/">Download NTGREGOPT</a> &middot; (<a href="http://www.larshederer.homepage.t-online.de/erunt/ntregopt.txt">Details</a>)<br class="C" /></p>
<hr class="C" />
<p><a id="defragmenting" name="defragmenting"></a></p>
<h2>Ultimate Defragmenting</h2>
<p>I say &#8220;Ultimate Defragmenting&#8221; because this is the result of a lot of testing of all the various defragmenting software out there, reading a lot of documentation, and running benchmarking to find the fastest results.  This is a mix of several individual defragmenting steps combined for a once-a-year ultimate defragmenting session.  This is what I use today, and although it&#8217;s altogether a long process, each step you&#8217;ll add a new tool or skill that you can use by itself from here on out.</p>
<p class="inote">ATTENTION:  While running MyDefrag/JkDefrag, SpinRite, and UltraDefrag your computer can get very hot and that is very not cool.  I set my laptop on a coke can and pointed a small desk fan at it which kept it very very cool, so do what you can to minimize heat during these programs.</p>
<h3>PageDefrag</h3>
<p><img src="/wp-content/uploads/2009/10/PageDefrag-115x94.gif" alt="PageDefrag SysInternals By Mark Russinovich" title="PageDefrag SysInternals By Mark Russinovich" width="115" height="94" class="IFL" /><a href="http://technet.microsoft.com/en-us/sysinternals/bb897426.aspx">PageDefrag</a> uses advanced techniques to provide you what commercial defragmenters cannot: the ability for you to see how fragmented your paging files and Registry hives are, and to defragment them. In addition, it defragments event log files and Windows 2000/XP hibernation files (where system memory is saved when you hibernate a laptop).  One of the limitations of the Windows NT/2000 defragmentation interface is that it is not possible to defragment files that are open for exclusive access. Thus, standard defragmentation programs can neither show you how fragmented your paging files or Registry hives are, nor defragment them. Paging and Registry file fragmentation can be one of the leading causes of performance degradation related to file fragmentation in a system.<br class="C" /></p>
<p>I personally keep this enabled for every boot, as it only takes a few seconds after the first time it&#8217;s run.</p>
<p><a href="http://technet.microsoft.com/en-us/sysinternals/bb897426.aspx">Download PageDefrag</a><br class="C" /></p>
<h3>MyDefrag</h3>
<p><img class="IFL" src="/wp-content/uploads/2009/10/jkdefrag.gif" alt="jkdefrag" title="jkdefrag" width="128" height="101" class="alignnone size-full wp-image-3420" />JkDefrag is a disk defragmenter and optimizer for Windows 2000/2003/XP/Vista/2008/X64. Completely automatic and very easy to use, fast, low overhead, with several optimization strategies, and can handle floppies, USB disks, memory sticks, and anything else that looks like a disk to Windows. Included are a Windows version, a commandline version (for scheduling by the task scheduler or for use from administrator scripts), a screensaver version, a DLL library (for use from programming languages), versions for Windows X64, and the complete sources. (<a href="http://www.mydefrag.com/Manual-FrequentlyAskedQuestions.html">Frequently Asked Questions</a>)<br class="C" /></p>
<p>After trying out dozens of degragmenting programs, this is my favorite.  I utilize the cool screensaver function and just run sometimes when I&#8217;m calling it a day.</p>
<h4><a href="http://www.mydefrag.com/Manual-TipsAndTricks.html">Tips and tricks</a></h4>
<ul>
<li>Many users start looking for defragmentation/optimization programs when their computer becomes slow. The main reason for a slow computer is a full harddisk. A full harddisk is slow because the distance between files is greater than on a fresh practically empty harddisk. Deleting half the data on a full disk will just about double the speed. The more free diskspace, the faster your computer will be.</li>
<li>Buy a second harddisk (for example an USB harddisk) and move little used stuff from your primary harddisk to that secondary harddisk. The second disk can also be used for backing up the primary disk.</li>
<li>When buying a new computer, buy the biggest harddisk you can afford. Investing in a bigger harddisk gives more speed-per-dollar than investing in a faster CPU or investing in more memory.</li>
<li>Cleanup old junk from your harddisk before running MyDefrag. You can clean Windows files with for example &#8220;Start -&gt; Programs -&gt; Accessories -&gt; System Tools -&gt; Disk Cleanup&#8221;, or with something like the freeware <a href="http://www.ccleaner.com/"><b>CCleaner</b></a> program.</li>
<li>Reboot before running MyDefrag. This will release files that are in use, so they can be defragmented and optimized.</li>
<li>Boot into Windows safe mode by pressing F8 when booting, and then run MyDefrag. It will be slower because the Windows disk cache is off in safe mode, but MyDefrag will be able to process (a few) more files.</li>
<li>Stop your real time virus scanner before running MyDefrag. Virus scanners check all disk activity, making defragmentation and optimization very slow.</li>
<li>Move the swap file to another volume, reboot, defragment, and move the swap file back. If you don&#8217;t have a second volume then temporarily make the swap file small, for example 100Mb.</li>
<li>Package unused files with a packager such as <a href="http://www.7-zip.org/">7-zip</a>. The packagefile not only takes less harddisk space, but will also defragment and optimize much faster than the individual files. <b>Note</b>: This does not apply to Windows NTFS compression, which will actually make defragmentation and optimization slower.</li>
<li>The first partition on a harddisk is significantly faster than other partitions. Try to use other partitions only for data that is used less often, such as music, movies, archives, backups, logfiles.</li>
<li>If you have 2 physical harddisks of the same speed, then place the pagefile on the first partition of the second harddisk.</li>
</ul>
<p>The way I recommend is to run MyDefrag at the highest level of defragmentation once, which took my fastest PC almost 30 hours.  Once that is done you can just run it normally in 20 minutes or so.. This software also has the best defrag information I&#8217;ve found to date, so check out the documentation on the site.</p>
<p><a href="http://www.mydefrag.com/Manual-DownloadAndInstall.html">Download MyDefrag</a><br class="C" /></p>
<h3>UltraDefrag</h3>
<p><img class="IFL" src="/wp-content/uploads/2009/10/ultra_defrag.gif" alt="UltraDefrag - powerful Defragmentation tool for Windows" title="UltraDefrag - powerful Defragmentation tool for Windows" width="196" height="158" class="alignnone size-full wp-image-3424" />UltraDefrag is a powerful Open Source Defragmentation tool for Windows Platform. It is very fast, because the defragmenting is done via the kernel-mode driver. There are three interface available : Graphical, Console and Native.  I personally like the MyDefrag more because I think it does a better job, but I also use the UltraDefrag tool because it has one very important feature like the PageDefrag tool.  It has a native version.  That means it can run before Windows loads up by utilizing the bootexecute, the same place that windows chkdsk runs at boot.   It also can takeover for Windows builtin prefetcher, to speed up the loading of frequently used programs, which I&#8217;ll explain a bit later. <br class="C" /></p>
<p>I set ultradefrag up after the MyDefrag 30hour defrag completes, to run at boot and control the prefetching, then I erase any prefetch files currently saved and reboot which lets it defrag the system.</p>
<pre>
erase /Q "%SYSTEMROOT%\Prefetch\*.*"
</pre>
<p>Once both MyDefrag and UltraDefrag have run THEN I finally login to windows and don&#8217;t open any programs to let the windows OS files get optimized by not doing anything at all for 5 minutes..  Then I reboot and log back in and this time I don&#8217;t do anything for 30 minutes and reboot.  Finally I log back in and this time I instantly load up 10 of my most frequently used programs, (DreamWeaver, Photoshop, Firefox, Chrome, Notepad2, Thunderbird, Internet Explorer, and a few others) and once they are all loaded I don&#8217;t do anything for an hour.  Then I reboot and repeat that same process.</p>
<p>This may seem odd or made up but I do my research and this allows your prefetched files to be optimized, including your boot prefetch files.   Once that is done I reboot and run all the defrags again.  Then I reboot and am ready for the last step.</p>
<p><a href="http://ultradefrag.sourceforge.net/">Download UltraDefrag</a><br class="C" /></p>
<hr class="C" />
<p><a id="optimize-disk" name="optimize-disk"></a></p>
<h2>Optimize Physical Hard Disk</h2>
<p>Now at this point the system is defragged and optimized as much as I can get it, but the last step is to run a program to go over every single bit on our hard-drive-disk to keep the drive clean and healthy and its too technical for me to understand, I just know its amazingly cool and I noticed a big change right away.</p>
<h3>HD Tune</h3>
<p><img class="IFL" src="/wp-content/uploads/2009/10/HDTune_Benchmark-116x94.gif" alt="HDTune_Benchmark" title="HDTune_Benchmark" width="116" height="94" class="alignnone size-thumbnail wp-image-3425" />HD Tune is a fantastic little utility that you can use to benchmark the DISK IO speed of your various drives, internal and external, fixed and USB, firewire, etc..  Other than using it to determine your fastest drives for moving your program files and temps to, I am just including it in this article because it is an awesome program that you will love.<br class="C" /></p>
<p><a href="http://www.hdtune.com/download.html">Download HD Tune</a></p>
<h3>SpinRite</h3>
<p>This is the last step in this guide, and was the one thing that surprised me the most in terms of how much of a speed improvement I noticed after using it.  SpinRite is the most capable, thorough, and reliable utility that has ever been created for the long term maintenance, recovery, and repair of mass storage systems.   SpinRite is not a drive defragmenter. SpinRite operates with the drive&#8217;s built-in intelligence to reassign and relocate defective sectors without creating file system fragments. Thus, running SpinRite does not create fragments, but neither does it eliminate any that may exist before it was run. Unlike any other disk utility, SpinRite interfaces directly to the hard disk system’s hardware, rather than working through the system’s operating system or BIOS.  <a href="http://www.grc.com/sr/faq.htm">FAQ</a>.</p>
<p class="anote">The way that we use SpinRite in this article is method #4, Drive Maintenance mode, which reads and writes and verifies every single sector and area of your hard drives, and improves the health of your hard drive a lot.  Even on my new 4K dell power laptop, this had a noticeable improvement on speed.  After running this 20+ hours for my fastest PC, I rebooted, defragged with jkdefrag, and that is the end of this article.</p>
<blockquote cite="http://www.grc.com/files/technote.pdf">
<p>
<h4>In case you don&#8217;t already know . . . What is SpinRite?</h4>
<p>SpinRite is a stand-alone DOS application that specializes in the recovery of marginally or completely unreadable hard and floppy disk data, and in the lifetime maintenance of PC mass storage devices. It earned its stripes many years ago by introducing the concept of non-destructive low-level reformatting and sector interleave optimization. Since then its capabilities have continued to broaden until it has become the premiere tool for disk data recovery and magnetic mass storage drive maintenance. Written in assembly language, SpinRite still performs as well on a clunky old 4.77 megahertz PC/XT as on a screaming 333 megahertz Pentium II.</p>
</p>
</blockquote>
<p> While SpinRite 6.0 is running, you can toggle through seven displays:<br />
<img src="/wp-content/uploads/2009/10/spinrite-4.png" width="480" height="267" alt="Graphic Status Display" /><br />
<img src="/wp-content/uploads/2009/10/spinrite-5.png" width="480" height="267" alt="Real-Time Activities" /><br />
<img src="/wp-content/uploads/2009/10/spinrite-6.png" width="480" height="267" alt="Technical Log" /><br />
<img src="/wp-content/uploads/2009/10/spinrite-7.png" width="480" height="267" alt="S.M.A.R.T. System Monitor" /><br />
<img src="/wp-content/uploads/2009/10/spinrite-8.png" width="480" height="267" alt="DynaStat Data Recovery" /></p>
<p><a href="http://www.grc.com/cs/prepurch.htm">Purchase and Download SpinRite</a></p>
<hr class="C" />
<hr class="C" />
<hr class="C" />
<p>More Reading</p>
<ul>
<li><a href="http://www.pcnet-online.com/picks/spinrite.htm">PCNet File Catch &#8211; SpinRite 6.0</a></li>
<li><a href="http://www.linuxjournal.com/article/7684">SpinRite 6.0 for Linux Users</a></li>
<li><a href="http://www.sysopt.com/tutorials/article.php/12034_3549006_1">Anticipate Drive Problems Early with SpinRite v6.0</a></li>
<li><a href="http://www.blackviper.com/WinXP/supertweaks.htm">Black Viper &#8211; Windows XP Super Tweaks</a></li>
<li><a href="http://www.blackviper.com/WinXP/custom_sc_bat_Pro.php">Black Viper &#8211; Optimize your Services</a></li>
<li><a href="http://www.horstmann.com/bigj/help/windows/advanced.html">Advanced Windows Shell Tutorial</a></li>
<li><a href="http://commandwindows.com/batch.htm">Batch Files (Scripts) in Windows </a></li>
<li><a href="http://proton.pathname.com/fhs/">File System Heirarchy</a></li>
<li><a href="http://www.grc.com/sn/sn-186.htm">Steve Gibson discussing Defragmenting</a></li>
</ul>
<p><a href="http://www.askapache.com/windows/defrag-optimize-speed-xp.html">Windows Optimization &#8211; Intense Part II</a> originally appeared on AskApache.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/tglzbZu8jN-QsIRIkRhErkzzr2Q/0/da"><img src="http://feedads.g.doubleclick.net/~a/tglzbZu8jN-QsIRIkRhErkzzr2Q/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/tglzbZu8jN-QsIRIkRhErkzzr2Q/1/da"><img src="http://feedads.g.doubleclick.net/~a/tglzbZu8jN-QsIRIkRhErkzzr2Q/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.askapache.com/~ff/apache/htaccess?a=lsZiZjPcUUs:ISJRqxbUKPo:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=lsZiZjPcUUs:ISJRqxbUKPo:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=lsZiZjPcUUs:ISJRqxbUKPo:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=lsZiZjPcUUs:ISJRqxbUKPo:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=lsZiZjPcUUs:ISJRqxbUKPo:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/windows/defrag-optimize-speed-xp.html/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		<feedburner:origLink>http://www.askapache.com/windows/defrag-optimize-speed-xp.html</feedburner:origLink></item>
		<item>
		<title>Advanced WordPress wp-config.php Tweaks</title>
		<link>http://feeds.askapache.com/~r/apache/htaccess/~3/I3-QaJt-u1Q/advanced-wp-config-php-tweaks.html</link>
		<comments>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html#comments</comments>
		<pubDate>Sat, 03 Oct 2009 07:23:37 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[phpinfo]]></category>
		<category><![CDATA[wp-config.php]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3341</guid>
		<description><![CDATA[<p>The bottom line for this article is that I want to make WordPress as fast, secure, and easy to install, run, and manage because I am using it more and more for client production sites, I will work for days in order to solve an issue so that I never have to spend time on that issue again. Time is money in this industry and that is ultimately (time) what there is to gain by tweaking WordPress.</p>

<p class="cnote"><strong>Note:</strong> I spent no time on readability, this is primarily a read the code and figure it out article.. This is for advanced users looking for a reference or discussion and for those of you looking to advance.  Feedback would be great <em>if you make it that far..</em></p>]]></description>
			<content:encoded><![CDATA[<p>The bottom line for this article is that I want to make WordPress as fast, secure, and easy to install, run, and manage because I am using it more and more for client production sites, I will work for days in order to solve an issue so that I never have to spend time on that issue again. Time is money in this industry and that is ultimately (time) what there is to gain by tweaking WordPress.</p>
<p class="cnote"><strong>Note:</strong> I spent no time on readability, this is primarily a read the code and figure it out article.. This is for advanced users looking for a reference or discussion and for those of you looking to advance.  Feedback would be great <em>if you make it that far..</em></p>
<p>For a better handle on the way I like to structure web site directories, see <a href="http://www.askapache.com/htaccess/optimize-website-files-cache-security.html">Optimize a Website for Speed, Security, and Easy Management</a> but note it is a bit outdated compared to what I&#8217;m doing now.  I don&#8217;t have the luxury of using only one type of server, or hosting provider anymore, so I have been working towards making things even more portable in order to move from host to host from server to server without issues i.e. my portable <a href="http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html">.bash_profile</a>.</p>
<p>So I&#8217;ve been basically experimenting various ways to accomplish that and thought I would share what I am currently doing for my benefit and hopefully get some input.  All of my WP installs run the development version, and one main idea with my setups is that upgrading is automated.  So I really keep the WordPress install clean and use plugins and wp-config.php to do all the customization.</p>
<ul>
<li>Portability &#8211; Hands-free upgrades and easy to move</li>
<li>Security &#8211; Additional security and protection</li>
<li>Speed &#8211; Less CPU and Disk I/O</li>
<li>Customization &#8211; All my favorite customizations</li>
</ul>
<h2>wp-config.php</h2>
<p>These are the main settings I use.. Seriously this is more like an interactive article, because to understand it you will need to do some code grepping.  You may want to grab a jolt.</p>
<h3>ASKAPACHE_ROOT</h3>
<p>The ASKAPACHE_ROOT variable is just a better way for me to be able to include and access all the different files in my site tree.  For instance, in my non-wp php files, I can do this:</p>
<pre>
!defined(&#039;ASKAPACHE_ROOT&#039;) &#038;&#038; require $_SERVER[&#039;DOCUMENT_ROOT&#039;] . &#039;/wp-config.php&#039;;
include(ASKAPACHE_ROOT . &#039;/includes/custom-download.inc.php&#039;);
</pre>
<h3>ASKAPACHE_LOCK</h3>
<p>This is one of my all-time favorite hacks, that I think is one of the most useful methods I employ as a web developer.  This allows me to use far-future-expire headers for optimum caching, while still forcing browsers to re-validate every day or so automatically, or forcing them to re-validate whenever I change the suffix.  This takes advantage of the <a href="http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html">mod_rewrite trick</a> that I use on EVERY site I run, definately worth learning. Because I practice best-practice web-standards, for every web site I create a single css file and javascript file, which I then add to the template like:</p>
<pre>
&lt;link rel="stylesheet" type="text/css" media="all" href="http://z.askapache.com/c/apache-0&lt;?php echo ASKAPACHE_LOCK?&gt;.css" /&gt;
&lt;script src="http://z.askapache.com/j/apache-0&lt;?php echo ASKAPACHE_LOCK;?&gt;.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<pre>
&lt;?php
/**
 * The base configurations of the WordPress.
 *
 * This file has the following configurations: MySQL settings, Table Prefix,
 * Secret Keys, WordPress Language, and ABSPATH. You can find more information by
 * visiting {@link http://codex.wordpress.org/Editing_wp-config.php Editing
 * wp-config.php} Codex page. You can get the MySQL settings from your web host.
 *
 * This file is used by the wp-config.php creation script during the
 * installation. You don&#039;t have to use the web site, you can just copy this file
 * to "wp-config.php" and fill in the values.
 *
 * @package WordPress
 */
/* http://codex.wordpress.org/Editing_wp-config.php */
&nbsp;
/** /home/liet/askapache.com */
!defined(&#039;ASKAPACHE_ROOT&#039;) &#038;&#038; define(&#039;ASKAPACHE_ROOT&#039;, str_replace(&#039;/htdocs&#039;,&#039;&#039;, $_SERVER[&#039;DOCUMENT_ROOT&#039;]));
&nbsp;
/** The 008 at the end is for manual tweaking.  time() returns seconds since &#039;00:00:00 1970-01-01 UTC&#039;. */
// http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html
!defined(&#039;ASKAPACHE_LOCK&#039;) &#038;&#038; define(ASKAPACHE_LOCK&#039;, substr(time(),0,5).&#039;008&#039;); // 12533001
&nbsp;
/** absolute path to the Wordpress directory */
!defined(&#039;ABSPATH&#039;) &#038;&#038; define(&#039;ABSPATH&#039;, ASKAPACHE_ROOT .&#039;/htdocs/&#039;);
&nbsp;
/**
 * WP_SITEURL, defined since WordPress Version 2.2, allows the WordPress address (URL) to be defined. The valued defined is the address where your WordPress core files reside.
 * It should include the http:// part too. Do not put a slash "/" at the end.
 * Setting this value in wp-config.php overrides the wp_options table value for siteurl and disables the WordPress address (URL) field in the Administration &gt; Settings &gt; General panel.
 */
!defined(&#039;WP_SITEURL&#039;) &#038;&#038; define(&#039;WP_SITEURL&#039;, &#039;http://&#039;.$_SERVER[&#039;SERVER_NAME&#039;]);
&nbsp;
/**
 * WP_HOME is another wp-config.php option added in WordPress Version 2.2. Similar to WP_SITEURL,
 * WP_HOME overrides the wp_options table value for home but does not change it permanently.
 * home is the address you want people to type in their browser to reach your WordPress blog. It should include the http:// part. Also, do not put a slash "/" at the end.
 */
!defined(&#039;WP_HOME&#039;) &#038;&#038; define(&#039;WP_HOME&#039;, WP_SITEURL);
&nbsp;
/** no trailing slash, full paths only */
!defined(&#039;WP_CONTENT_DIR&#039;) &#038;&#038; define( &#039;WP_CONTENT_DIR&#039;, ABSPATH . &#039;wp-content&#039; );
&nbsp;
// full url - WP_CONTENT_DIR is defined further up
!defined(&#039;WP_CONTENT_URL&#039;) &#038;&#038; define( &#039;WP_CONTENT_URL&#039;, WP_SITEURL . &#039;/wp-content&#039;);
&nbsp;
/** Allows for the plugins directory to be moved from the default location. @since 2.6.0 */
// full path, no trailing slash
!defined(&#039;WP_PLUGIN_DIR&#039;) &#038;&#038; define( &#039;WP_PLUGIN_DIR&#039;, WP_CONTENT_DIR . &#039;/plugins&#039; );
&nbsp;
/** Allows for the plugins directory to be moved from the default location. @since 2.6.0 */
// full url, no trailing slash
!defined(&#039;WP_PLUGIN_URL&#039;) &#038;&#038; define( &#039;WP_PLUGIN_URL&#039;, WP_CONTENT_URL . &#039;/plugins&#039; );
&nbsp;
/** Allows for the plugins directory to be moved from the default location. @since 2.1.0 */
// Relative to ABSPATH.  For back compat.
//!defined(&#039;PLUGINDIR&#039;) &#038;&#038; define( &#039;PLUGINDIR&#039;, &#039;wp-content/plugins&#039; );
&nbsp;
/** Number of autosaves to save. TRUE is default and enables post revisions, FALSE disables revisions completely. */
!defined(&#039;WP_POST_REVISIONS&#039;) &#038;&#038; define(&#039;WP_POST_REVISIONS&#039;, 150);
&nbsp;
/* ini_set(&#039;memory_limit&#039;, WP_MEMORY_LIMIT); */
!defined(&#039;WP_MEMORY_LIMIT&#039;) &#038;&#038; define(&#039;WP_MEMORY_LIMIT&#039;, &#039;64M&#039;);
&nbsp;
/** Only check at this interval for new messages. Default is 5min */
/** @since 2.9  */
!defined(&#039;WP_MAIL_INTERVAL&#039;) &#038;&#038; define(&#039;WP_MAIL_INTERVAL&#039;, 3600); // 1 hour
&nbsp;
/** Saves updated post values to post from edit window every x seconds. (default 60)
 * When editing a post, WordPress uses Ajax to auto-save revisions to the post as you edit. You may want to increase this setting for longer delays in between auto-saves, or decrease the setting to make sure you never lose changes.
 * @since 2.5.0 */
!defined( &#039;AUTOSAVE_INTERVAL&#039; ) &#038;&#038; define( &#039;AUTOSAVE_INTERVAL&#039;, 60 );
&nbsp;
/** @since 2.9.0  */
/** Permanently deletes posts, pages, attachments, and comments which have been in the trash for EMPTY_TRASH_DAYS. */
!defined( &#039;EMPTY_TRASH_DAYS&#039; ) &#038;&#038; define( &#039;EMPTY_TRASH_DAYS&#039;, 300 );
</pre>
<hr class="C" />
<h2>Debugging WordPress</h2>
<p>One of my secrets for getting really good at this stuff is to master debugging.  There is really not ever a time when I am working on a site that I don&#8217;t have <a href="http://www.askapache.com/security/elite-log-file-scrolling-with-color-syntax.html">color-highlighted logs scrolling automatically in an ssh window</a>.  It&#8217;s really almost impossible to fix problems with wordpress or do any kind of advanced anything without being able to view debugging info.  At first I relied heavily on a <a href="http://www.askapache.com/php/custom-phpini-tips-and-tricks.html">custom php.ini</a> being available on the server, but after having to deal with many hosts who don&#8217;t allow <code>php.ini</code> files I now rely completely on setting values using <a href="http://php.net/manual/en/function.ini-set.php">ini_set</a> for ultimate portability. Detailed towards the end of this article and is also included in this <code>wp-config.php</code></p>
<pre>
/**#@+
 * DEBUGGING STUFF
 */
/** display of notices during development. if false, error_reporting is E_ERROR | E_WARNING | E_PARSE | E_USER_ERROR | E_USER_WARNING | E_RECOVERABLE_ERROR otherwise E_ALL */
!defined(&#039;WP_DEBUG&#039;) &#038;&#038; define(&#039;WP_DEBUG&#039;, false);
&nbsp;
/** The SAVEQUERIES definition saves the database queries to a array and that array can be displayed to help analyze those queries.
 *  The information saves each query, what function called it, and how long that query took to execute.  */
!defined(&#039;SAVE_QUERIES&#039;) &#038;&#038; define(&#039;SAVE_QUERIES&#039;, WP_DEBUG);
&nbsp;
!defined(&#039;ACTION_DEBUG&#039;) &#038;&#038; define(&#039;ACTION_DEBUG&#039;, WP_DEBUG);
&nbsp;
/** This will allow you to edit the scriptname.dev.js files in the wp-includes/js and wp-admin/js directories.  */
!defined(&#039;SCRIPT_DEBUG&#039;) &#038;&#038; define(&#039;SCRIPT_DEBUG&#039;, WP_DEBUG);

&nbsp;
/** Add define(&#039;WP_DEBUG_LOG&#039;, true); to enable php debug logging to WP_CONTENT_DIR/debug.log */
//!defined(&#039;WP_DEBUG_LOG&#039;) &#038;&#038; define(&#039;WP_DEBUG_LOG&#039;, true);
&nbsp;
/** This determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user.
 *  Add define(&#039;WP_DEBUG_DISPLAY&#039;, false); to wp-config.php to use the globally configured setting for display_errors and not force it to On */
!defined(&#039;WP_DEBUG_DISPLAY&#039;) &#038;&#038; define(&#039;WP_DEBUG_DISPLAY&#039;, false);
</pre>
<hr class="C" />
<h2>Ultimate Security Tweaks</h2>
<p>Well, ultimate for WP&#8217;s built-in keys and password functions, this is all for wp-config.php keep in mind.  This is a very neccessary and recommended step, and is one of the only things I modify for each new installation.</p>
<h3>Security KEYS</h3>
<p>If like me you are familiar with password-cracking software like John the ripper, rainbow hash tables, l0pht-crack, etc.. then you will like to know that you can specify your own keys and salts for the encryption used by WP.  They are <code>AUTH_KEY</code>, <code>AUTH_SALT</code>, <code>SECURE_AUTH_KEY</code>, <code>SECURE_AUTH_SALT</code>, <code>LOGGED_IN_KEY</code>, <code>LOGGED_IN_SALT</code>, <code>NONCE_KEY</code>, <code>NONCE_SALT</code>,  <code>SECRET_KEY</code> and <code>SECRET_SALT</code>.</p>
<p>A random and long key gives you better encryption, and exponentially increasing that is using a random and long salt for the encryption.  Encryptions with known salts are incredibly easy to decrypt compared to encryptions with secure salts, because the salt + key individually need to be guessed in order to find a matching hash, vs. just the key if the salt is known.  See: <a href="http://www.askapache.com/security/locating-weak-passwords.html">Locating weak passwords</a>.</p>
<blockquote>
<p>A secret key is a hashing salt which makes your site harder to hack and access harder to crack by adding random elements to the password.</p>
<p>In simple terms, a secret key is a password with elements that make it harder to generate enough options to break through your security barriers. A password like &#8220;password&#8221; or &#8220;test&#8221; is simple and easily broken. A random, unpredictable password such as &#8220;88a7da62429ba6ad3cb3c76a09641fc&#8221; takes years to come up with the right combination.</p>
</blockquote>
<p>For more information on the technical background and breakdown of secret keys and secure passwords, see: </p>
<ul>
<li><a href="http://wordpress.org/support/topic/170987">WordPress Support Forum &#8211; HOWTO: Set up secret keys in WordPress 2.6+</a></li>
<li><a href="http://en.wikipedia.org/wiki/Password_cracking">Wikipedia&#8217;s explanation of Password Cracking</a></li>
</ul>
<p>I like to use the <a href="https://api.wordpress.org/secret-key/1.1/">WordPress.org secret-key service</a> 4 times.  That&#8217;s because for each key and salt I like to do: (1 key from api +random keyboard input+1 key from api).</p>
<pre>
/**#@+
 * Authentication Unique Keys.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies.
 * This will force all users to have to log in again.
 *
 * @since 2.6.0
 *
 * Get salt to add to hashes to help prevent attacks.
 *
 * The secret key is located in two places: the database in case the secret key
 * isn&#039;t defined in the second place, which is in the wp-config.php file. If you
 * are going to set the secret key, then you must do so in the wp-config.php
 * file.
 *
 * The secret key in the database is randomly generated and will be appended to
 * the secret key that is in wp-config.php file in some instances. It is
 * important to have the secret key defined or changed in wp-config.php.
 *
 * If you have installed WordPress 2.5 or later, then you will have the
 * SECRET_KEY defined in the wp-config.php already. You will want to change the
 * value in it because hackers will know what it is. If you have upgraded to
 * WordPress 2.5 or later version from a version before WordPress 2.5, then you
 * should add the constant to your wp-config.php file.
 *
 * Below is an example of how the SECRET_KEY constant is defined with a value.
 * You must not copy the below example and paste into your wp-config.php. If you
 * need an example, then you can have a
 * {@link https://api.wordpress.org/secret-key/1.1/ secret key created} for you.
 *
 * Salting passwords helps against tools which has stored hashed values of
 * common dictionary strings. The added values makes it harder to crack if given
 * salt string is not weak.
 *
 * @since 2.5
 * @link https://api.wordpress.org/secret-key/1.1/ Create a Secret Key for wp-config.php
 *
 * @return string Salt value from either &#039;SECRET_KEY&#039; or &#039;secret&#039; option
 */
define(&#039;AUTH_KEY&#039;,        &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?p[B+GR{@&gt;{Yq`c|LnG;dvq#| %OA_cbBSU6,rICC1o/c)-|&#039;);
define(&#039;SECURE_AUTH_KEY&#039;, &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[Bb15baar8&#038;R-r&lt;[T|?(xhJJABGq+Ux+U$)-Hltp/&#039;);
define(&#039;LOGGED_IN_KEY&#039;,   &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[B&lt;5n6DG|YWnJ9tY2!M1L)`{-$LW~~Ia%.uCbn!P. 41o2$Z$4&#039;);
define(&#039;NONCE_KEY&#039;,       &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[Bgu&lt;wM*zewR0.{+m:bmrB?wj!B,4]Wo+4 Avk ApR-D?E&#039;);
define(&#039;SECRET_KEY&#039;,     &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[B52ugH6muE9r4._iZwoYKUybrqLPpv|d Xr+|yrqhUE&#039;);
&nbsp;
define(&#039;AUTH_SALT&#039;,        &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdm~Ky%+%~PPa5b YEmDI%U[W!-B&#039;);
define(&#039;SECURE_AUTH_SALT&#039;, &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmad/7o6.AU3%9o-|Kqm]+eUqr-n~:ag&#039;);
define(&#039;LOGGED_IN_SALT&#039;,   &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmsLiCv@KJ{#wd(?qe(KcH3!&#039;);
define(&#039;NONCE_SALT&#039;,       &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmG9&gt;+wm 2)bS0Pd_+1rx0brX]ND8|&#039;);
define(&#039;SECRET_SALT&#039;,      &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdm2&lt;&gt;))U|sty)+4vpWooKls/^[vN&#039;);
/**#@-*/
</pre>
<hr class="C" />
<h2>Using SSL for Admin and Login</h2>
<p>SSL is kinda required from my point of view, it is just way to easy to sniff data off the wire otherwise.  At least with SSL you force them to use tools like burpsuite, paros proxy, webscarab, etc..</p>
<pre>
/** @since 2.6.0  */
!defined(&#039;FORCE_SSL_ADMIN&#039;) &#038;&#038; define(&#039;FORCE_SSL_ADMIN&#039;, true);
&nbsp;
/** @since 2.6.0  */
!defined(&#039;FORCE_SSL_LOGIN&#039;) &#038;&#038; define(&#039;FORCE_SSL_LOGIN&#039;, true);
</pre>
<h3>Mod_Rewrite to Force SSL</h3>
<p>This is pretty cool, it forces non-https for all urls except for /wp-admin and wp-login.php, which both require https.  It also checks for the logged_in_cookie, and if that is present in the request then it doesn't force non-https.  Kinda confusing if you don't have a <a href="http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet.html">mod_rewrite cheatsheet</a>.</p>
<pre>
RewriteCond %{THE_REQUEST} ^$ [OR]
RewriteCond %{REQUEST_URI} ^/(wp-admin|wp-login\.php).*$ [NC,OR]
RewriteCond %{HTTP_COOKIE} ^.*wp_li_sadfsdfasdf11b361cdsdfasdfasd=.*$ [NC]
RewriteRule .* - [S=1]
&nbsp;
RewriteCond %{HTTPS} =on [OR]
RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
RewriteRule .* http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
&nbsp;
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(wp-admin/.*|wp-login\.php.*)\ HTTP/ [NC]
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
</pre>
<hr class="C" />
<h2>File System Permissions</h2>
<p><a class="IFR" href="http://www.askapache.com/security/chmod-umask-fileperms-stat-tricks.html"><img src="/wp-content/uploads/2008/11/danger-chmod-screenshot.png" alt="chmod, umask, file permissions test" title="chmod, umask, file permissions test" /></a>You can get a basic and solid intro on file permissions by reading: <a href="http://codex.wordpress.org/Changing_File_Permissions">Changing File Permissions</a>, or you can check out some of my <a href="http://www.askapache.com/security/chmod-umask-fileperms-stat-tricks.html">file permission research</a>.<br class="C" /></p>
<pre>
/** The permissions as octal number, usually 0644 for files, 0755 for dirs.
 *  http://codex.wordpress.org/Changing_File_Permissions
 *  if ( !$wp_filesystem-&gt;mkdir($remote_destination, FS_CHMOD_DIR) )
 */
!defined(&#039;FS_CHMOD_DIR&#039;) &#038;&#038; define(&#039;FS_CHMOD_DIR&#039;, (0755 &#038; ~ umask()));
!defined(&#039;FS_CHMOD_FILE&#039;) &#038;&#038; define(&#039;FS_CHMOD_FILE&#039;, (0644 &#038; ~ umask()));
/**#@-*/
&nbsp;
/** Define the timeouts for the connections. Only available after the construct is called to allow for per-transport overriding of the default. */
//stream_set_timeout( $stream, FS_TIMEOUT );
//!defined(&#039;FS_TIMEOUT&#039;) &#038;&#038; define(&#039;FS_TIMEOUT&#039;, 30);
&nbsp;
//$this-&gt;link = @ftp_connect($this-&gt;options[&#039;hostname&#039;], $this-&gt;options[&#039;port&#039;], FS_CONNECT_TIMEOUT);
//!defined(&#039;FS_CONNECT_TIMEOUT&#039;) &#038;&#038; define(&#039;FS_CONNECT_TIMEOUT&#039;, 30);
&nbsp;
// function get_filesystem_method($args = array(), $context = false) {
//  $method = defined(&#039;FS_METHOD&#039;) ? FS_METHOD : false; //Please ensure that this is either &#039;direct&#039;, &#039;ssh&#039;, &#039;ftpext&#039; or &#039;ftpsockets&#039;
//!defined(&#039;FS_METHOD&#039;) &#038;&#038; define(&#039;FS_METHOD&#039;, &#039;direct&#039;);
&nbsp;
/** These methods for the WordPress core, plugin, and theme upgrades try to determine the WordPress path, as reported by PHP, but symlink trickery can sometimes
 * &#039;muck this up&#039; so if you know the paths to the various folders on the server, as seen via your FTP user, you can manually define them in the wp-config.php file.
 * FS_METHOD forces the filesystem method. It should only be "direct", "ssh", "ftpext", or "ftpsockets".
 * FTP_BASE is the full path to the "base" folder of the WordPress installation.
 * FTP_CONTENT_DIR is the full path to the wp-content folder of the WordPress installation.
 * FTP_PLUGIN_DIR is the full path to the plugins folder of the WordPress installation.
 * FTP_PUBKEY is the full path to your SSH public key.
 * FTP_PRIKEY is the full path to your SSH private key.
 * FTP_USER is either user FTP or SSH username. Most likely these are the same, but use the appropriate one for the type of update you wish to do.
 * FTP_PASS is the password for the username entered for FTP_USER. If you are using SSH public key authentication this can be omitted.
 * FTP_HOST is the hostname:port combination for your SSH/FTP server. The standard FTP port is 21 and the standard SSH port is 22.
 */
//define(&#039;FS_METHOD&#039;, &#039;ftpext&#039;);
//define(&#039;FTP_BASE&#039;, &#039;/path/to/wordpress/&#039;);
//define(&#039;FTP_CONTENT_DIR&#039;, &#039;/path/to/wordpress/wp-content/&#039;);
//define(&#039;FTP_PLUGIN_DIR &#039;, &#039;/path/to/wordpress/wp-content/plugins/&#039;);
//define(&#039;FTP_PUBKEY&#039;, &#039;/home/username/.ssh/id_rsa.pub&#039;);
//define(&#039;FTP_PRIKEY&#039;, &#039;/home/username/.ssh/id_rsa&#039;);
//define(&#039;FTP_USER&#039;, &#039;username&#039;);
//define(&#039;FTP_PASS&#039;, &#039;password&#039;);
//define(&#039;FTP_HOST&#039;, &#039;ftp.example.org:21&#039;);
&nbsp;
/**
 * Block requests through the proxy.
 *
 * Those who are behind a proxy and want to prevent access to certain hosts may do so. This will
 * prevent plugins from working and core functionality, if you don&#039;t include api.wordpress.org.
 *
 * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL in your wp-config.php file
 * and this will only allow localhost and your blog to make requests.
 * The constant WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
 * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow.
 *
 * @since 2.8.0
 * @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
/** @since 2.9  */
//!defined(&#039;WP_HTTP_BLOCK_EXTERNAL&#039;) &#038;&#038; define( &#039;WP_HTTP_BLOCK_EXTERNAL&#039;, false );
&nbsp;
/*
 * The constant WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
 * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow.
 *
 * @since 2.8.0
 * @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
 * $accessible_hosts = preg_split(&#039;|,\s*|&#039;, WP_ACCESSIBLE_HOSTS);
 * return !in_array( $check[&#039;host&#039;], $accessible_hosts ); //Inverse logic, If its in the array, then we can&#039;t access it.
 */
//!defined(&#039;WP_ACCESSIBLE_HOSTS&#039;) &#038;&#038; define( &#039;WP_ACCESSIBLE_HOSTS&#039;, &#039;askapache.com,askapache.org&#039; );
</pre>
<hr class="C" />
<h3>Cookies!</h3>
<p>There&#8217;s always a little comfort in having non-default cookies for security (against auto-bots), and using shorter names also means smaller HTTP Packets.</p>
<p>The <code>$cookie_hash</code> is my hack to get around the fact that <code>COOKIEHASH</code> isn&#8217;t definable in <code>wp-config</code>.</p>
<pre>
/**#@+
 * COOKIES
 * Used to guarantee unique hash cookies @since 1.5 */
$cookie_hash=md5(WP_SITEURL);
&nbsp;
/** Set a cookie now to see if they are supported by the browser.
 * setcookie(TEST_COOKIE, &#039;WP Cookie check&#039;, 0, COOKIEPATH, COOKIE_DOMAIN);
 * @since 2.3.0 */
!defined(&#039;TEST_COOKIE&#039;) &#038;&#038; define(&#039;TEST_COOKIE&#039;, &#039;wp_tc&#039;);
&nbsp;
/* @since 2.6.0 */
!defined(&#039;LOGGED_IN_COOKIE&#039;) &#038;&#038; define(&#039;LOGGED_IN_COOKIE&#039;, &#039;wp_li_&#039; . $cookie_hash);
&nbsp;
/* @since 2.6.0 */
!defined(&#039;SECURE_AUTH_COOKIE&#039;) &#038;&#038; define(&#039;SECURE_AUTH_COOKIE&#039;, &#039;wp_sa_&#039; . $cookie_hash);
&nbsp;
/* @since 2.5.0 */
!defined(&#039;AUTH_COOKIE&#039;) &#038;&#038; define(&#039;AUTH_COOKIE&#039;, &#039;wp_a_&#039; . $cookie_hash);
&nbsp;
/* @since 2.0.0 */
!defined(&#039;PASS_COOKIE&#039;) &#038;&#038; define(&#039;PASS_COOKIE&#039;, &#039;wp_p_&#039; . $cookie_hash);
&nbsp;
/* @since 2.0.0 */
!defined(&#039;USER_COOKIE&#039;) &#038;&#038; define(&#039;USER_COOKIE&#039;, &#039;wp_u_&#039; . $cookie_hash);
&nbsp;
/* ok unset this var, its not needed as COOKIEHASH will have this value, but is not definable in wp-config.php */
unset($cookie_hash);
&nbsp;
/** @since 1.2.0 */
!defined(&#039;COOKIEPATH&#039;) &#038;&#038; define(&#039;COOKIEPATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_HOME . &#039;/&#039; ) );
&nbsp;
/** @since 1.5.0 */
!defined(&#039;SITECOOKIEPATH&#039;) &#038;&#038; define(&#039;SITECOOKIEPATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_SITEURL . &#039;/&#039; ) );
&nbsp;
/** @since 2.6.0 */
!defined(&#039;ADMIN_COOKIE_PATH&#039;) &#038;&#038; define( &#039;ADMIN_COOKIE_PATH&#039;, SITECOOKIEPATH . &#039;wp-admin&#039; );
&nbsp;
/** @since 2.6.0 */
!defined(&#039;PLUGINS_COOKIE_PATH&#039;) &#038;&#038; define( &#039;PLUGINS_COOKIE_PATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_PLUGIN_URL)  );
&nbsp;
/** @since 2.0.0 */
!defined(&#039;COOKIE_DOMAIN&#039;) &#038;&#038; define(&#039;COOKIE_DOMAIN&#039;, $_SERVER[&#039;SERVER_NAME&#039;]);
</pre>
<hr class="C" />
<pre>
/**
  * The WP_CACHE setting, if true, includes the wp-content/advanced-cache.php script, when executing wp-settings.php.
  * For an advanced caching plugin to use, static because you would only want one
  * if ( defined(&#039;WP_CACHE&#039;) )@include WP_CONTENT_DIR . &#039;/advanced-cache.php&#039;;
  */
!defined(&#039;WP_CACHE&#039;) &#038;&#038; define(&#039;WP_CACHE&#039;, true);
&nbsp;
/** WordPress Localized Language, defaults to en_US.
 *
 * Change this to localize WordPress.  A corresponding MO file for the chosen
 * language must be installed to wp-content/languages. For example, install
 * de.mo to wp-content/languages and set WPLANG to &#039;de&#039; to enable German
 * language support. */
!defined(&#039;WPLANG&#039;) &#038;&#038; define (&#039;WPLANG&#039;, &#039;en_US&#039;);
&nbsp;
/** Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR
 *   and uses that folder if it exists. Or it uses the "languages" folder in WPINC. @since 2.1.0 */
//!defined(&#039;WP_LANG_DIR&#039;) &#038;&#038; define(&#039;WP_LANG_DIR&#039;, ABSPATH . WPINC . &#039;/languages&#039;);
&nbsp;
/** LANGDIR defines what directory the WPLANG .mo file resides. If LANGDIR is not defined WordPress looks first to wp-content/languages and then wp-includes/languages for the .mo defined by WPLANG file.  Old static relative path maintained for limited backwards compatibility - won&#039;t work in some cases*/
//!defined(&#039;LANGDIR&#039;) &#038;&#038; define(&#039;LANGDIR&#039;, &#039;wp-content/languages&#039;);
&nbsp;
/** Stores the location of the WordPress directory of functions, classes, and core content. @since 1.0.0 */
//!defined(&#039;WPINC&#039;) &#038;&#038; define(&#039;WPINC&#039;, &#039;wp-includes&#039;);
</pre>
<hr class="C" />
<h2>WPMU Stuff</h2>
<p>I personally don&#8217;t use.</p>
<pre>
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined(&#039;WPMU_PLUGIN_DIR&#039;) &#038;&#038; define( &#039;WPMU_PLUGIN_DIR&#039;, WP_CONTENT_DIR . &#039;/mu-plugins&#039; ); // full path, no trailing slash
&nbsp;
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined(&#039;WPMU_PLUGIN_URL&#039;) &#038;&#038; define( &#039;WPMU_PLUGIN_URL&#039;, WP_CONTENT_URL . &#039;/mu-plugins&#039; ); // full url, no trailing slash
&nbsp;
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined( &#039;MUPLUGINDIR&#039; ) &#038;&#038; define( &#039;MUPLUGINDIR&#039;, &#039;wp-content/mu-plugins&#039; ); // Relative to ABSPATH.  For back compat.
</pre>
<hr class="C" />
<h2>WordPress Database</h2>
<p>This is usually the only thing I have to manually edit when creating a new site, unless I just use the same DB and modify the $table_prefix, (farther down). I run everything I possibly can in UTF-8, but if you don&#8217;t already know alot about character sets, wow it is one of the most confusing things so you may want to save learning about that topic for another day.  Otherwise the following are helpful (<em>and show how confusing character sets are!</em>)</p>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/charset-charsets.html">Character Sets and Collations MySQL Support</a></li>
<li><a href="http://codex.wordpress.org/Converting_Database_Character_Sets">Converting Database Character Sets</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html">UTF-8 character sets</a> (<a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a>)</li>
</ul>
<p>If you ever setup WP to use the builtin membership features, make sure you learn about the <code>CUSTOM_USER_TABLE</code> and <code>CUSTOM_USER_META_TABLE</code> constants, I&#8217;ve found them very helpful.</p>
<pre>
/**#@+
 * MySQL settings
 */
/** The name of the database for WordPress */
define(&#039;DB_NAME&#039;, &#039;askapachewpblog75&#039;);
&nbsp;
/** The username to access the database */
define(&#039;DB_USER&#039;, &#039;askapache245d&#039;);
&nbsp;
/** The password for the username to access the database */
define(&#039;DB_PASSWORD&#039;, &#039;asdfklj2340&#039;);
&nbsp;
/** The hostname to connect to the database at */
define(&#039;DB_HOST&#039;, &#039;mysql.askapache.com&#039;);
&nbsp;
/** The charset of the database */
define(&#039;DB_CHARSET&#039;, &#039;utf8&#039;);
&nbsp;
/** The collation of the database */
define(&#039;DB_COLLATE&#039;, &#039;utf8_general_ci&#039;);
</pre>
<hr class="C" />
<h2>$table_prefix</h2>
<p>The <code>$table_prefix</code> is the value placed in the front of your database tables. Change the value if you want to use something other than wp_ for your database prefix. Typically this is changed if you are <a href="http://codex.wordpress.org/Installing_Multiple_Blogs">installing multiple WordPress blogs</a> in the same database, and also for enhanced security.</p>
<p>Its a safe and good idea to change this value pre-installation to add more security to your WordPress blog. Exploits attempted against your WordPress blog by malicious crackers often are built with the premise that your blog uses the prefix wp_, by changing the value you mitigate some attack vectors. </p>
<pre>
/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each a unique
 * prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = &#039;ar15_&#039;;
&nbsp;
/** CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE are used to designated that the user and usermeta tables normally utilized by WordPress are not used, instead these values/tables are used to store your user information. */
//!defined(&#039;CUSTOM_USER_TABLE&#039;) &#038;&#038; define(&#039;CUSTOM_USER_TABLE&#039;, $table_prefix . &#039;my_users&#039;);
//!defined(&#039;CUSTOM_USER_META_TABLE&#039;) &#038;&#038; define(&#039;CUSTOM_USER_META_TABLE&#039;, $table_prefix . &#039;my_usermeta&#039;);
</pre>
<h2>Setup PHP Ini Settings</h2>
<pre>
&nbsp;
/** Turns the output of errors on or off, you really never want this on, you should only view errors by reading the log file. */
ini_set(&#039;display_errors&#039;, WP_DEBUG_DISPLAY);
&nbsp;
/** Tells whether script error messages should be logged to the server&#039;s error log or error_log. */
ini_set(&#039;log_errors&#039;, &#039;On&#039;);
&nbsp;
/** http://us.php.net/manual/en/timezones.php */
ini_set(&#039;date.timezone&#039;, &#039;America/Indianapolis&#039;);
&nbsp;
/** Where to log php errors */
ini_set(&#039;error_log&#039;, ASKAPACHE_ROOT . &#039;/logs/php_error.log&#039;);
&nbsp;
/** Set the memory limit, otherwise defaults to &#039;32M&#039; */
ini_set(&#039;memory_limit&#039;, WP_MEMORY_LIMIT);
</pre>
<h2>Sessions are slow</h2>
<p>So I only use sessions when I have a specific use&#8230; In this case I need sessions only when one of the tools in the /online-tools/ directory is being used.  And that is for the <a href="http://www.askapache.com/security/php-captcha-anti-spam-example.html">captcha image</a>.  In the future I won&#8217;t ever use sessions.</p>
<pre>
if(preg_match( &#039;#^/online-tools/#&#039;,$_SERVER[&#039;REQUEST_URI&#039;])) session_start();
</pre>
<h2>Include Custom Files</h2>
<p>Sure you could use the my-hacks.php that WP allows, or you can just stick your functions in your <code>TEMPLATEPATH/functions.php</code> file, but they are executed only after the wp-settings.php file, which may be too late for your file.</p>
<p>In the past I&#8217;ve also used the <a href="http://us2.php.net/manual/en/ini.core.php#ini.auto-prepend-file">auto_prepend_file</a> settings to run my script before anything (index.php) but I ran into some issues on different hosts, and it wasn&#8217;t as portable.</p>
<p>This is useful because you can have a file with globally available functions that you can use in non-WP areas as well as WP areas.  I am moving away from this more and more as I learn more about classes and build plugins instead for portability.</p>
<pre>
include_once ASKAPACHE_ROOT . &#039;/includes/myfunctions.inc&#039;;
&nbsp;
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . &#039;wp-settings.php&#039;);
?&gt;
</pre>
<h2>Some Useful PHP</h2>
<p>I am constantly trying to make my sites and code more portable, so I am using plugins alot more to accomplish things that I use to do with separate php.  Here are some examples of minimal php.</p>
<pre>
add_filter("the_generator", create_function(&#039;$a&#039;,&#039;return "";&#039;));
add_filter(&#039;the_content&#039;, create_function(&#039;$a&#039;, &#039;return ((is_feed())? $a."&lt;p&gt;&lt;a href=\"".get_permalink()."\"&gt;".get_the_title()."&lt;/a&gt; originally appeared on ".get_bloginfo("name").".&lt;/p&gt;" : $a);&#039;), 99999);
add_filter(&#039;excerpt_length&#039;, create_function(&#039;$a&#039;, &#039;return 300;&#039;),99);
add_filter(&#039;excerpt_more&#039;, create_function(&#039;$a&#039;, &#039;return "&hellip;";&#039;),99);
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"pingback\" href=\"&#039;.get_bloginfo(&#039;pingback_url&#039;).&#039;\" /&gt;\n";&#039;), 95 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"schema.rss\" href=\"http://purl.org/rss/1.0/\" /&gt;\n";&#039;), 96 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"schema.rel\" href=\"http://purl.org/vocab/relationship/\" /&gt;\n";&#039;), 97 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"meta\" type=\"application/rdf+xml\" href=\"/foaf.rdf\" /&gt;\n";&#039;), 98 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link href=\"/favicon.ico\" rel=\"shortcut icon\" type=\"image/x-icon\" /&gt;\n";&#039;), 99 );
</pre>
<h2>Debugging Note</h2>
<p><a href="http://wordpress.org/extend/plugins/askapache-debug-viewer/screenshots/"><img alt="AskApache Advanced Debugging Output" src="http://s.wordpress.org/extend/plugins/askapache-debug-viewer/screenshot-1.png?r=160129" title="AskApache Advanced Debugging Output" width="625" height="548" /></a>If you read this far than you probably know how important debugging is, but I sometimes like to stick the best tips deep in my articles to make sure only YOU find it.  GRTFM isn&#8217;t used on this site, it&#8217;s mostly a requirement because my writing can get pretty bad..  The point, debugging is more than a crucial requirement if you want to do anything cool.  Don&#8217;t worry I got you.. check my <a href="http://wordpress.org/extend/plugins/askapache-debug-viewer/">AskApache Debug Viewer Plugin from the official WP site</a>.  It&#8217;s pretty close to providing as verbose amount of information that I could possibly figure out how to get out of php, probably more than you have ever seen at least, I focused on quantity.  I use it all the time on new installs as there is no setup required and it tells me advanced information about the setup of the server, hacker code for sure.<br class="C" /></p>
<p>Here&#8217;s a quick function to see set global vars, I just think this is interesting code.</p>
<pre>
function askapache_global_debug(){
  global $_GET,$_POST,$_COOKIE,$_SESSION,$_ENV,$_FILES,$_SERVER,$_REQUEST,$HTTP_POST_FILES,$HTTP_POST_VARS,$HTTP_SERVER_VARS,$HTTP_RAW_POST_DATA,$HTTP_GET_VARS,$HTTP_COOKIE_VARS,$HTTP_ENV_VARS;
  $gv=create_function(&#039;$n&#039;,&#039;global $$n; ob_start(); if ( is_array($$n) &#038;&#038; sizeof($$n)&gt;0 &#038;&#038; print("[{$n}]\n") ) print_r($$n);return ob_get_clean();&#039;);
  foreach (array(&#039;_GET&#039;,&#039;_POST&#039;,&#039;_COOKIE&#039;,&#039;_SESSION&#039;,&#039;_ENV&#039;,&#039;_FILES&#039;,&#039;_SERVER&#039;,&#039;_REQUEST&#039;,&#039;HTTP_POST_FILES&#039;,&#039;HTTP_POST_VARS&#039;,&#039;HTTP_SERVER_VARS&#039;,&#039;HTTP_RAW_POST_DATA&#039;,&#039;HTTP_GET_VARS&#039;,&#039;HTTP_COOKIE_VARS&#039;,&#039;HTTP_ENV_VARS&#039;) as $k)echo $gv($k);
  print_r(get_defined_constants());
}
</pre>
<p class="anote">Also check the WordPress Codex page: <a href="http://codex.wordpress.org/Editing_wp-config.php">Editing wp-config.php</a></p>
<p><a href="http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html">Advanced WordPress wp-config.php Tweaks</a> originally appeared on AskApache.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/59Xb1SqegdwI3r8xNd5VFmqMIsY/0/da"><img src="http://feedads.g.doubleclick.net/~a/59Xb1SqegdwI3r8xNd5VFmqMIsY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/59Xb1SqegdwI3r8xNd5VFmqMIsY/1/da"><img src="http://feedads.g.doubleclick.net/~a/59Xb1SqegdwI3r8xNd5VFmqMIsY/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.askapache.com/~ff/apache/htaccess?a=I3-QaJt-u1Q:cTfaWD2XFFE:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=I3-QaJt-u1Q:cTfaWD2XFFE:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=I3-QaJt-u1Q:cTfaWD2XFFE:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=I3-QaJt-u1Q:cTfaWD2XFFE:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=I3-QaJt-u1Q:cTfaWD2XFFE:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		<feedburner:origLink>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html</feedburner:origLink></item>
		<item>
		<title>Protecting Files with Advanced Mod_Rewrite Anti-Hotlinking</title>
		<link>http://feeds.askapache.com/~r/apache/htaccess/~3/0rMfz7Va7gg/anti-hotlinking-mod_rewrite.html</link>
		<comments>http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html#comments</comments>
		<pubDate>Wed, 16 Sep 2009 05:09:11 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache Modules]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[htaccess]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3287</guid>
		<description><![CDATA[<p><a class="IFL" href="http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html "><img src="/wp-content/uploads/2009/09/866310_predestrian_lights-71x116.jpg" alt="Stop hotlinking with .htaccess mod_rewrite" title="Stop hotlinking with .htaccess mod_rewrite" width="71" height="116" /></a>If you have files on your site that you don't want indexed by malicious search engines, grabbed and leeched by malicious spammers, or stolen and made available elsewhere, you can use mod_rewrite to drastically reduce or totally reduce that activity.<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href="/wp-content/uploads/2009/09/866310_predestrian_lights.jpg"><img src="/wp-content/uploads/2009/09/866310_predestrian_lights.jpg" alt="Stop hotlinking with .htaccess mod_rewrite" title="Stop hotlinking with .htaccess mod_rewrite" width="184" height="300" class="size-full wp-image-3288" /></a><br style="padding-top:2em;" /><br />If you have files on your site that you don&#8217;t want indexed by malicious search engines, grabbed and leeched by malicious spammers, or stolen and made available elsewhere, you can use mod_rewrite to drastically reduce or totally reduce that activity.</p>
<h2>The Worst Kind of People</h2>
<p><strong>Spammers, and Leechers</strong>.  They operate like this:  Let&#8217;s say you have some mp3 files on a server, and SOMEWHERE on the web there is a link to that mp3 file&#8217;s location.  This includes in javascript files, css files, robots.txt files, the spammers and leechers robots check all those files looking for the type of link they are looking for.   Then they try to request that file usually utilizing a number of different types of requests to get access to the file.  Then they use it for personal gain, at your peril.</p>
<p>Some robots perform valuable services for the world wide web community, and other leeching programming is pretty cool, so not all these activities are perpetrated by nefarious spammers.</p>
<p><br class="C" /></p>
<h2>Blocking by IP COOKIE</h2>
<p>Ok so if a link exists to your file, it is going to be requested by a robot eventually, so the way to defeat them is by doing something on your site that modifies the way a user would request it.  Robots for the most part are not javascript-capable, so the most-common advanced method is to set a cookie using javascript, and then we can check for that cookie in the request for the file using mod_rewrite.</p>
<p>So if your site sets a cookie named fspammers, and furthermore gives that cookie a value of 445, then this is what the request sent by an HTTP Client like Firefox looks like.</p>
<pre>
GET /hotlink/lovefreedom.mp3 HTTP/1.1
Host: z.askapache.com
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1.3) Gecko/20090824 Firefox/3.5.3 (.NET CLR 3.5.30729)
Accept: image/png,image/*;q=0.8,*/*;q=0.5
Accept-Language: en-us,en;q=0.5
Accept-Encoding: gzip,deflate
Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
Keep-Alive: 300
Connection: keep-alive
Referer: http://www.askapache.com/wordpress/seo-in-wordpress.html
Cookie: fspammers=455
</pre>
<h2>Mod_Rewrite HTTP Headers</h2>
<p>The mod_rewrite module has access to ALL the HTTP Headers sent in a request, so for each of the HTTP Headers in the request example above, we can use mod_rewrite to validate.</p>
<h2>Mod_Rewrite .htaccess Example</h2>
<p>Finally, now that everyone is on the same page about what is really going on, here is the <a href="http://www.askapache.com/htaccess/htaccess.html" title=".htaccess tutorial">.htaccess</a> code that blocks any requests for anything in the /hotlink/ folder.</p>
<p>Here are the triggers this code blocks access based on.</p>
<ol>
<li><strong>Cookie</strong>: Checks if fspammers cookie is present, and that it has the value of 445. </li>
<li><strong>HTTP Protocol</strong>: Checks if HTTP 1.1 is being used (many robots use 1.0)</li>
<li><strong>Host</strong>: Checks that the HOST Requested was z.askapache.com</li>
<li><strong>Referer</strong>:  Checks for Referring site is z.askapache.com or www.askapache.com</li>
</ol>
<pre>
RewriteEngine On
RewriteBase /
&nbsp;
RewriteCond %{HTTP_COOKIE} !^.*fspammers=445.*$ [NC,OR]
RewriteCond %{THE_REQUEST} !^[A-Z]{3,9}\ /(.*)\ HTTP/1\.1 [NC,OR]
RewriteCond %{HTTP_HOST} !^z\.askapache\.com$ [NC,OR]
RewriteCond %{HTTP_REFERER} !^http://(www|z)\.askapache\.com.*$ [NC]
RewriteRule ^hotlink/.*$ - [F]&lt;/p&gt;
</pre>
<p><a href="http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html">Protecting Files with Advanced Mod_Rewrite Anti-Hotlinking</a> originally appeared on AskApache.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/shmXVAY_SxdoCbsaCWKLxmsOg9U/0/da"><img src="http://feedads.g.doubleclick.net/~a/shmXVAY_SxdoCbsaCWKLxmsOg9U/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/shmXVAY_SxdoCbsaCWKLxmsOg9U/1/da"><img src="http://feedads.g.doubleclick.net/~a/shmXVAY_SxdoCbsaCWKLxmsOg9U/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.askapache.com/~ff/apache/htaccess?a=0rMfz7Va7gg:UQdXu7QPLTQ:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=0rMfz7Va7gg:UQdXu7QPLTQ:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=0rMfz7Va7gg:UQdXu7QPLTQ:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=0rMfz7Va7gg:UQdXu7QPLTQ:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=0rMfz7Va7gg:UQdXu7QPLTQ:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.askapache.com/htaccess/anti-hotlinking-mod_rewrite.html</feedburner:origLink></item>
		<item>
		<title>Crazy Advanced Mod_Rewrite Tutorial</title>
		<link>http://feeds.askapache.com/~r/apache/htaccess/~3/C_WZMW2_cog/crazy-advanced-mod_rewrite-tutorial.html</link>
		<comments>http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html#comments</comments>
		<pubDate>Fri, 11 Sep 2009 16:55:32 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache Modules]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[askapache]]></category>
		<category><![CDATA[cheatsheet]]></category>
		<category><![CDATA[howto]]></category>
		<category><![CDATA[htaccess rewrite]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=1209</guid>
		<description><![CDATA[<p><strong>Note:  Extremely ILL Content</strong><br />Find the key to unlocking mod_rewrite and you WILL be sick..  sick with a diamond disease on your wrist!<br /><a class="hs hs13" href="/wp-content/uploads/2008/08/mod_rewrite_ascii.png"></a></p>]]></description>
			<content:encoded><![CDATA[<p><a class="hs hs13" href="/wp-content/uploads/2008/08/mod_rewrite_ascii.png"></a><strong>Are you an advanced mod_rewrite expert or guru?</strong>  This article is for YOU too!  Just make sure to read all the way to the bottom..<br class="C" /></p>
<p class="anote">The following undocumented techniques and methods will allow you to utilize mod_rewrite at an  &#8220;expert level&#8221; by showing you how to <a href="http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html#decoded">unlock its secrets</a>.  <br class="C" /></p>
<p>Most if not all web developers and server administrators struggle with Apache mod_rewrite.  It&#8217;s very tough and only gets a little easier with practice.  Until Now!  Get ready to explode your learning curve, I figured something out.</p>
<h2>Why mod_rewrite is so tough</h2>
<p>I have come to the conclusion, after many hours of zenful thought, that the reason mod_rewrite is so tough is pretty obvious, people are trying to apply regular-expressions to URLs and Variables that they don&#8217;t really understand.  They understand what they want, but they don&#8217;t understand what the URLS and Variables are that they are trying to rewrite.</p>
<h2>Hit-Or-Miss with mod_rewrite</h2>
<p>A lot of the mod_rewrite &#8220;experts&#8221; and &#8220;gurus&#8221; floating around the net absolutely know their mod_rewrite, but what separates them from a beginner or novice is for the most part an understanding of what the URLS and Variables look like that are targeted by the regular expressions.  Take this simple rewriterule that rewrites requests made without the www to www.</p>
<pre class='brushhtaccess'>
RewriteEngine On
RewriteBase /
&nbsp;
RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
RewriteRule .+ http://www.askapache.com%{REQUEST_URI}
</pre>
<p>Pretty simple right?  WRONG.  Most people could not figure that out..</p>
<h3>Why?</h3>
<p>The reason intelligent people can&#8217;t figure that out is because they have no idea what HTTP_HOST or REQUEST_URI actually looks like.  How can you write a rule for something if you don&#8217;t know what it looks like?  You can&#8217;t.</p>
<h2>When Not To Use Mod_Rewrite</h2>
<p>Ok so heres an important concept that alot of people haven&#8217;t heard.  You should only use <a href="http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html">mod_rewrite&#8217;s rewriterule </a>when you use a rewritecond or if you are rewriting internally like my <a href="http://www.askapache.com/htaccess/pimp-out-your-feedburner-count.html">feedcount hack</a>.</p>
<p>If you are simply redirecting one url to another, you should definately be using the much easier <a href="http://www.askapache.com/htaccess/seo-search-engine-friendly-redirects-without-mod_rewrite.html">mod_alias&#8217;s redirect and redirectmatch</a>, which is enabled on most Apache servers.</p>
<h2>When To Use Mod_Rewrite</h2>
<p>So then, you should only use mod_rewrite&#8217;s rewriterule when you are checking against one of the Apache Environment Variables to determine whether to rewrite or not.  This is where the Apache Documentation is grossly lacking.  They don&#8217;t tell you what those variables look like, leaving us completely incapable of creating rewrites based on them.  <strong>Not anymore.</strong></p>
<h3>Mod_Rewrite Environment Variables (The Secret)</h3>
<p>Here&#8217;s the variables I have found accessible by <a href="http://httpd.apache.org/docs/trunk/mod/mod_rewrite.html#rewritecond">mod_rewrite</a> (both documented and undocumented).   A thing to note is that you can set these variables early in an .htaccess file using SetEnv, RewriteRule, Header, etc.. and they will be accessible at the end of the .htaccess file.<br class="C" /></p>
<ul class="UL1">
<li><code>API_VERSION</code></li>
<li><code>AUTH_TYPE</code></li>
<li><code>CONTENT_LENGTH</code></li>
<li><code>CONTENT_TYPE</code></li>
<li><code>DOCUMENT_ROOT</code></li>
<li><code>GATEWAY_INTERFACE</code></li>
<li><code>HTTPS</code></li>
<li><code>HTTP_ACCEPT</code></li>
<li><code>HTTP_ACCEPT_CHARSET</code></li>
<li><code>HTTP_ACCEPT_ENCODING</code></li>
<li><code>HTTP_ACCEPT_LANGUAGE</code></li>
<li><code>HTTP_CACHE_CONTROL</code></li>
</ul>
<ul class="UL1">
<li><code>HTTP_CONNECTION</code></li>
<li><code>HTTP_COOKIE</code></li>
<li><code>HTTP_FORWARDED</code></li>
<li><code>HTTP_HOST</code></li>
<li><code>HTTP_KEEP_ALIVE</code></li>
<li><code>HTTP_PROXY_CONNECTION</code></li>
<li><code>HTTP_REFERER</code></li>
<li><code>HTTP_USER_AGENT</code></li>
<li><code>IS_SUBREQ</code></li>
<li><code>ORIG_PATH_INFO</code></li>
<li><code>ORIG_PATH_TRANSLATED</code></li>
<li><code>ORIG_SCRIPT_FILENAME</code></li>
</ul>
<ul class="UL1">
<li><code>ORIG_SCRIPT_NAME</code></li>
<li><code>PATH</code></li>
<li><code>PATH_INFO</code></li>
<li><code>PHP_SELF</code></li>
<li><code>QUERY_STRING</code></li>
<li><code>REDIRECT_QUERY_STRING</code></li>
<li><code>REDIRECT_REMOTE_USER</code></li>
<li><code>REDIRECT_STATUS</code></li>
<li><code>REDIRECT_URL</code></li>
<li><code>REMOTE_ADDR</code></li>
<li><code>REMOTE_HOST</code></li>
<li><code>REMOTE_IDENT</code></li>
</ul>
<ul class="UL1">
<li><code>REMOTE_PORT</code></li>
<li><code>REMOTE_USER</code></li>
<li><code>REQUEST_FILENAME</code></li>
<li><code>REQUEST_METHOD</code></li>
<li><code>REQUEST_TIME</code></li>
<li><code>REQUEST_URI</code></li>
<li><code>SCRIPT_FILENAME</code></li>
<li><code>SCRIPT_GROUP</code></li>
<li><code>SCRIPT_NAME</code></li>
<li><code>SCRIPT_URI</code></li>
<li><code>SCRIPT_URL</code></li>
<li><code>SCRIPT_USER</code></li>
</ul>
<ul class="UL1">
<li><code>SERVER_ADDR</code></li>
<li><code>SERVER_ADMIN</code></li>
<li><code>SERVER_NAME</code></li>
<li><code>SERVER_PORT</code></li>
<li><code>SERVER_PROTOCOL</code></li>
<li><code>SERVER_SIGNATURE</code></li>
<li><code>SERVER_SOFTWARE</code></li>
<li><code>THE_REQUEST</code></li>
<li><code>TIME</code></li>
<li><code>TIME_DAY</code></li>
<li><code>TIME_HOUR</code></li>
<li><code>TIME_MIN</code></li>
</ul>
<ul class="UL1">
<li><code>TIME_MON</code></li>
<li><code>TIME_SEC</code></li>
<li><code>TIME_WDAY</code></li>
<li><code>TIME_YEAR</code></li>
<li><code>TZ</code></li>
<li><code>UNIQUE_ID</code></li>
</ul>
<hr class="C" />
<h2>Decoding Mod_Rewrite Variables</h2>
<p>So when I realized my problem was that I didn&#8217;t know the value of the variable being tested by the RewriteCond, I set out to try and discover how to view those variables..  Keep in mind you can also use RewriteLogging, but its only allowed for root users who can edit the httpd.conf, this is .htaccess.</p>
<h3>Setting Environment Variables with RewriteRule</h3>
<p>I discovered a multitude of methods to set and view apache environment variables, using various modules and some core tricks, but the method that allows me to view the most environment variables is RewriteRule.. I wanted to use <a href="http://www.askapache.com/htaccess/setenvif.html">SetEnvIf</a> more, but its just not as powerful as mod_rewrite, due to programming.</p>
<p>This code sets the variable <code>INFO_REQUEST_URI</code> to have the value of <code>REQUEST_URI</code>.</p>
<pre class='brushhtaccess'>
RewriteEngine On
RewriteBase /
RewriteRule .* - [E=INFO_REQUEST_URI:%{REQUEST_URI},NE]
</pre>
<h3>Saving the Apache Variable Values</h3>
<p>Now the trick is how to view that environment variable&#8230;  The method I came up with is nice&#8230; We will send the environment variable value in an HTTP Header, as there isn&#8217;t much data manipulation/validation so you get an accurate look at the actual value..  At first I tried adding the variable value to a redirection using the query_string.. but a HTTP_USER_AGENT value doesn&#8217;t play well as a query_string.</p>
<h4>Using RequestHeader in .htaccess</h4>
<p>This code takes advantage of the incredible mod_headers apache module to actually ADD a whole new header to YOUR request.  Seriously one of the coolest tricks I&#8217;ve found yet.. Its almost the same as being able to spoof POST requests!  Since Headers can be protected data&#8230; <em>especially the HTTP_COOKIE header</em>..</p>
<pre class='brushhtaccess'>
RequestHeader set INFO_REQUEST_URI "%{INFO_REQUEST_URI}e"
</pre>
<h3>Viewing the Variable Values</h3>
<p>Now you can use any kind of server-run interpreter like perl, php, ruby, etc., to view all the variable values.  All cgi-script handlers like those are able to view request headers.. </p>
<h3>PHP Code to access Apache Variables</h3>
<p>Works even in safe-mode&#8230; any interpreter can view HTTP Headers!  Note that each of these variables are added as HTTP headers to the request for the script.. kinda confusing.. So each variable sent as a header is prefixed with HTTP_ to denote it was a header.</p>
<pre>
&lt;?php
header("Content-Type: text/plain");
$INFO=$MISS=array();
foreach($_SERVER as $v=&gt;$r)
{
  if(substr($v,0,9)==&#039;HTTP_INFO&#039;)
  {
    if(!empty($r))$INFO[substr($v,10)]=$r;
    else $MISS[substr($v,10)]=$r;
  }
}
&nbsp;
/* thanks Mike! */
ksort($INFO);
ksort($MISS);
ksort($_SERVER);
&nbsp;
echo "Received These Variables:\n";
print_r($INFO);
&nbsp;
echo "Missed These Variables:\n";
print_r($MISS);
&nbsp;
echo "ALL Variables:\n";
print_r($_SERVER);
?&gt;
</pre>
<h2>Time to Get Crazy</h2>
<p>Just create the above php file on your site as <code>/test/index.php</code> or whatever, then create /test/.htaccess which should contain the below <code>.htaccess file</code> snippet.  Now just request <code>/test/index.php</code> and be amazed!   If you&#8217;re looking for more general help check out this excellent <a href="http://www.addedbytes.com/apache/mod_rewrite-cheat-sheet/">mod_rewrite cheat sheet</a>.</p>
<p>Ok, so I&#8217;ve prepared the .htaccess code you can use to view the values of all these variables.  Just add it to a .htaccess file and make a request.  For this test I created an index.php file that printed out all the <code>$_SERVER</code> variables, and made requests to it.</p>
<pre class='brushhtaccess'>
RewriteEngine On
RewriteBase /
RewriteRule .* - [E=INFO_API_VERSION:%{API_VERSION},NE]
RewriteRule .* - [E=INFO_AUTH_TYPE:%{AUTH_TYPE},NE]
RewriteRule .* - [E=INFO_CONTENT_LENGTH:%{CONTENT_LENGTH},NE]
RewriteRule .* - [E=INFO_CONTENT_TYPE:%{CONTENT_TYPE},NE]
RewriteRule .* - [E=INFO_DOCUMENT_ROOT:%{DOCUMENT_ROOT},NE]
RewriteRule .* - [E=INFO_GATEWAY_INTERFACE:%{GATEWAY_INTERFACE},NE]
RewriteRule .* - [E=INFO_HTTPS:%{HTTPS},NE]
RewriteRule .* - [E=INFO_HTTP_ACCEPT:%{HTTP_ACCEPT},NE]
RewriteRule .* - [E=INFO_HTTP_ACCEPT_CHARSET:%{HTTP_ACCEPT_CHARSET},NE]
RewriteRule .* - [E=INFO_HTTP_ACCEPT_ENCODING:%{HTTP_ACCEPT_ENCODING},NE]
RewriteRule .* - [E=INFO_HTTP_ACCEPT_LANGUAGE:%{HTTP_ACCEPT_LANGUAGE},NE]
RewriteRule .* - [E=INFO_HTTP_CACHE_CONTROL:%{HTTP_CACHE_CONTROL},NE]
RewriteRule .* - [E=INFO_HTTP_CONNECTION:%{HTTP_CONNECTION},NE]
RewriteRule .* - [E=INFO_HTTP_COOKIE:%{HTTP_COOKIE},NE]
RewriteRule .* - [E=INFO_HTTP_FORWARDED:%{HTTP_FORWARDED},NE]
RewriteRule .* - [E=INFO_HTTP_HOST:%{HTTP_HOST},NE]
RewriteRule .* - [E=INFO_HTTP_KEEP_ALIVE:%{HTTP_KEEP_ALIVE},NE]
RewriteRule .* - [E=INFO_HTTP_MOD_SECURITY_MESSAGE:%{HTTP_MOD_SECURITY_MESSAGE},NE]
RewriteRule .* - [E=INFO_HTTP_PROXY_CONNECTION:%{HTTP_PROXY_CONNECTION},NE]
RewriteRule .* - [E=INFO_HTTP_REFERER:%{HTTP_REFERER},NE]
RewriteRule .* - [E=INFO_HTTP_USER_AGENT:%{HTTP_USER_AGENT},NE]
RewriteRule .* - [E=INFO_IS_SUBREQ:%{IS_SUBREQ},NE]
RewriteRule .* - [E=INFO_ORIG_PATH_INFO:%{ORIG_PATH_INFO},NE]
RewriteRule .* - [E=INFO_ORIG_PATH_TRANSLATED:%{ORIG_PATH_TRANSLATED},NE]
RewriteRule .* - [E=INFO_ORIG_SCRIPT_FILENAME:%{ORIG_SCRIPT_FILENAME},NE]
RewriteRule .* - [E=INFO_ORIG_SCRIPT_NAME:%{ORIG_SCRIPT_NAME},NE]
RewriteRule .* - [E=INFO_PATH:%{PATH},NE]
RewriteRule .* - [E=INFO_PATH_INFO:%{PATH_INFO},NE]
RewriteRule .* - [E=INFO_PHP_SELF:%{PHP_SELF},NE]
RewriteRule .* - [E=INFO_QUERY_STRING:%{QUERY_STRING},NE]
RewriteRule .* - [E=INFO_REDIRECT_QUERY_STRING:%{REDIRECT_QUERY_STRING},NE]
RewriteRule .* - [E=INFO_REDIRECT_REMOTE_USER:%{REDIRECT_REMOTE_USER},NE]
RewriteRule .* - [E=INFO_REDIRECT_STATUS:%{REDIRECT_STATUS},NE]
RewriteRule .* - [E=INFO_REDIRECT_URL:%{REDIRECT_URL},NE]
RewriteRule .* - [E=INFO_REMOTE_ADDR:%{REMOTE_ADDR},NE]
RewriteRule .* - [E=INFO_REMOTE_HOST:%{REMOTE_HOST},NE]
RewriteRule .* - [E=INFO_REMOTE_IDENT:%{REMOTE_IDENT},NE]
RewriteRule .* - [E=INFO_REMOTE_PORT:%{REMOTE_PORT},NE]
RewriteRule .* - [E=INFO_REMOTE_USER:%{REMOTE_USER},NE]
RewriteRule .* - [E=INFO_REQUEST_FILENAME:%{REQUEST_FILENAME},NE]
RewriteRule .* - [E=INFO_REQUEST_METHOD:%{REQUEST_METHOD},NE]
RewriteRule .* - [E=INFO_REQUEST_TIME:%{REQUEST_TIME},NE]
RewriteRule .* - [E=INFO_REQUEST_URI:%{REQUEST_URI},NE]
RewriteRule .* - [E=INFO_SCRIPT_FILENAME:%{SCRIPT_FILENAME},NE]
RewriteRule .* - [E=INFO_SCRIPT_GROUP:%{SCRIPT_GROUP},NE]
RewriteRule .* - [E=INFO_SCRIPT_NAME:%{SCRIPT_NAME},NE]
RewriteRule .* - [E=INFO_SCRIPT_URI:%{SCRIPT_URI},NE]
RewriteRule .* - [E=INFO_SCRIPT_URL:%{SCRIPT_URL},NE]
RewriteRule .* - [E=INFO_SCRIPT_USER:%{SCRIPT_USER},NE]
RewriteRule .* - [E=INFO_SERVER_ADDR:%{SERVER_ADDR},NE]
RewriteRule .* - [E=INFO_SERVER_ADMIN:%{SERVER_ADMIN},NE]
RewriteRule .* - [E=INFO_SERVER_NAME:%{SERVER_NAME},NE]
RewriteRule .* - [E=INFO_SERVER_PORT:%{SERVER_PORT},NE]
RewriteRule .* - [E=INFO_SERVER_PROTOCOL:%{SERVER_PROTOCOL},NE]
RewriteRule .* - [E=INFO_SERVER_SIGNATURE:%{SERVER_SIGNATURE},NE]
RewriteRule .* - [E=INFO_SERVER_SOFTWARE:%{SERVER_SOFTWARE},NE]
RewriteRule .* - [E=INFO_THE_REQUEST:%{THE_REQUEST},NE]
RewriteRule .* - [E=INFO_TIME:%{TIME},NE]
RewriteRule .* - [E=INFO_TIME_DAY:%{TIME_DAY},NE]
RewriteRule .* - [E=INFO_TIME_HOUR:%{TIME_HOUR},NE]
RewriteRule .* - [E=INFO_TIME_MIN:%{TIME_MIN},NE]
RewriteRule .* - [E=INFO_TIME_MON:%{TIME_MON},NE]
RewriteRule .* - [E=INFO_TIME_SEC:%{TIME_SEC},NE]
RewriteRule .* - [E=INFO_TIME_WDAY:%{TIME_WDAY},NE]
RewriteRule .* - [E=INFO_TIME_YEAR:%{TIME_YEAR},NE]
RewriteRule .* - [E=INFO_TZ:%{TZ},NE]
RewriteRule .* - [E=INFO_UNIQUE_ID:%{UNIQUE_ID},NE]
&nbsp;
RequestHeader set INFO_API_VERSION "%{INFO_API_VERSION}e"
RequestHeader set INFO_AUTH_TYPE "%{INFO_AUTH_TYPE}e"
RequestHeader set INFO_CONTENT_LENGTH "%{INFO_CONTENT_LENGTH}e"
RequestHeader set INFO_CONTENT_TYPE "%{INFO_CONTENT_TYPE}e"
RequestHeader set INFO_DOCUMENT_ROOT "%{INFO_DOCUMENT_ROOT}e"
RequestHeader set INFO_GATEWAY_INTERFACE "%{INFO_GATEWAY_INTERFACE}e"
RequestHeader set INFO_HTTPS "%{INFO_HTTPS}e"
RequestHeader set INFO_HTTP_ACCEPT "%{INFO_HTTP_ACCEPT}e"
RequestHeader set INFO_HTTP_ACCEPT_CHARSET "%{INFO_HTTP_ACCEPT_CHARSET}e"
RequestHeader set INFO_HTTP_ACCEPT_ENCODING "%{INFO_HTTP_ACCEPT_ENCODING}e"
RequestHeader set INFO_HTTP_ACCEPT_LANGUAGE "%{INFO_HTTP_ACCEPT_LANGUAGE}e"
RequestHeader set INFO_HTTP_CACHE_CONTROL "%{INFO_HTTP_CACHE_CONTROL}e"
RequestHeader set INFO_HTTP_CONNECTION "%{INFO_HTTP_CONNECTION}e"
RequestHeader set INFO_HTTP_COOKIE "%{INFO_HTTP_COOKIE}e"
RequestHeader set INFO_HTTP_FORWARDED "%{INFO_HTTP_FORWARDED}e"
RequestHeader set INFO_HTTP_HOST "%{INFO_HTTP_HOST}e"
RequestHeader set INFO_HTTP_KEEP_ALIVE "%{INFO_HTTP_KEEP_ALIVE}e"
RequestHeader set INFO_HTTP_MOD_SECURITY_MESSAGE "%{INFO_HTTP_MOD_SECURITY_MESSAGE}e"
RequestHeader set INFO_HTTP_PROXY_CONNECTION "%{INFO_HTTP_PROXY_CONNECTION}e"
RequestHeader set INFO_HTTP_REFERER "%{INFO_HTTP_REFERER}e"
RequestHeader set INFO_HTTP_USER_AGENT "%{INFO_HTTP_USER_AGENT}e"
RequestHeader set INFO_IS_SUBREQ "%{INFO_IS_SUBREQ}e"
RequestHeader set INFO_ORIG_PATH_INFO "%{INFO_ORIG_PATH_INFO}e"
RequestHeader set INFO_ORIG_PATH_TRANSLATED "%{INFO_ORIG_PATH_TRANSLATED}e"
RequestHeader set INFO_ORIG_SCRIPT_FILENAME "%{INFO_ORIG_SCRIPT_FILENAME}e"
RequestHeader set INFO_ORIG_SCRIPT_NAME "%{INFO_ORIG_SCRIPT_NAME}e"
RequestHeader set INFO_PATH "%{INFO_PATH}e"
RequestHeader set INFO_PATH_INFO "%{INFO_PATH_INFO}e"
RequestHeader set INFO_PHP_SELF "%{INFO_PHP_SELF}e"
RequestHeader set INFO_QUERY_STRING "%{INFO_QUERY_STRING}e"
RequestHeader set INFO_REDIRECT_QUERY_STRING "%{INFO_REDIRECT_QUERY_STRING}e"
RequestHeader set INFO_REDIRECT_REMOTE_USER "%{INFO_REDIRECT_REMOTE_USER}e"
RequestHeader set INFO_REDIRECT_STATUS "%{INFO_REDIRECT_STATUS}e"
RequestHeader set INFO_REDIRECT_URL "%{INFO_REDIRECT_URL}e"
RequestHeader set INFO_REMOTE_ADDR "%{INFO_REMOTE_ADDR}e"
RequestHeader set INFO_REMOTE_HOST "%{INFO_REMOTE_HOST}e"
RequestHeader set INFO_REMOTE_IDENT "%{INFO_REMOTE_IDENT}e"
RequestHeader set INFO_REMOTE_PORT "%{INFO_REMOTE_PORT}e"
RequestHeader set INFO_REMOTE_USER "%{INFO_REMOTE_USER}e"
RequestHeader set INFO_REQUEST_FILENAME "%{INFO_REQUEST_FILENAME}e"
RequestHeader set INFO_REQUEST_METHOD "%{INFO_REQUEST_METHOD}e"
RequestHeader set INFO_REQUEST_TIME "%{INFO_REQUEST_TIME}e"
RequestHeader set INFO_REQUEST_URI "%{INFO_REQUEST_URI}e"
RequestHeader set INFO_SCRIPT_FILENAME "%{INFO_SCRIPT_FILENAME}e"
RequestHeader set INFO_SCRIPT_GROUP "%{INFO_SCRIPT_GROUP}e"
RequestHeader set INFO_SCRIPT_NAME "%{INFO_SCRIPT_NAME}e"
RequestHeader set INFO_SCRIPT_URI "%{INFO_SCRIPT_URI}e"
RequestHeader set INFO_SCRIPT_URL "%{INFO_SCRIPT_URL}e"
RequestHeader set INFO_SCRIPT_USER "%{INFO_SCRIPT_USER}e"
RequestHeader set INFO_SERVER_ADDR "%{INFO_SERVER_ADDR}e"
RequestHeader set INFO_SERVER_ADMIN "%{INFO_SERVER_ADMIN}e"
RequestHeader set INFO_SERVER_NAME "%{INFO_SERVER_NAME}e"
RequestHeader set INFO_SERVER_PORT "%{INFO_SERVER_PORT}e"
RequestHeader set INFO_SERVER_PROTOCOL "%{INFO_SERVER_PROTOCOL}e"
RequestHeader set INFO_SERVER_SIGNATURE "%{INFO_SERVER_SIGNATURE}e"
RequestHeader set INFO_SERVER_SOFTWARE "%{INFO_SERVER_SOFTWARE}e"
RequestHeader set INFO_THE_REQUEST "%{INFO_THE_REQUEST}e"
RequestHeader set INFO_TIME "%{INFO_TIME}e"
RequestHeader set INFO_TIME_DAY "%{INFO_TIME_DAY}e"
RequestHeader set INFO_TIME_HOUR "%{INFO_TIME_HOUR}e"
RequestHeader set INFO_TIME_MIN "%{INFO_TIME_MIN}e"
RequestHeader set INFO_TIME_MON "%{INFO_TIME_MON}e"
RequestHeader set INFO_TIME_SEC "%{INFO_TIME_SEC}e"
RequestHeader set INFO_TIME_WDAY "%{INFO_TIME_WDAY}e"
RequestHeader set INFO_TIME_YEAR "%{INFO_TIME_YEAR}e"
RequestHeader set INFO_TZ "%{INFO_TZ}e"
RequestHeader set INFO_UNIQUE_ID "%{INFO_UNIQUE_ID}e"
</pre>
<h2><a id="decoded"></a>Mod_Rewrite Variables Decoded!</h2>
<pre class='brushhtaccess'>
[API_VERSION] =&gt; 20020903:12
[AUTH_TYPE] =&gt; Digest
[DOCUMENT_ROOT] =&gt; /home/user/www_root/askapache.com
[HTTPS] =&gt; off
[HTTP_ACCEPT] =&gt; text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
[HTTP_COOKIE] =&gt; PHPSESSID=752ee6d56e15f305233e30045987e5ce568c034; __qca=1176541225-59967328-5223185;
[HTTP_HOST] =&gt; www.askapache.com
[HTTP_REFERER] =&gt; http://www.askapache.com/protest/index.php?askapache=awesomeness&#038;you=rock
[HTTP_USER_AGENT] =&gt; Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
[IS_SUBREQ] =&gt; false
[QUERY_STRING] =&gt; e=404
[REMOTE_ADDR] =&gt; 22.162.144.211
[REMOTE_HOST] =&gt; 22.162.144.211
[REMOTE_PORT] =&gt; 4511
[REMOTE_USER] =&gt; administrator
[REQUEST_FILENAME] =&gt; /home/user/www_root/askapache.com/protest/index.php
[REQUEST_METHOD] =&gt; GET
[REQUEST_URI] =&gt; /protest/index.php
[SCRIPT_FILENAME] =&gt; /home/user/www_root/askapache.com/protest/index.php
[SCRIPT_GROUP] =&gt; daemonu
[SCRIPT_USER] =&gt; askapache
[SERVER_ADDR] =&gt; 208.113.134.190
[SERVER_ADMIN] =&gt; webmaster@askapache.com
[SERVER_NAME] =&gt; www.askapache.com
[SERVER_PORT] =&gt; 80
[SERVER_PROTOCOL] =&gt; HTTP/1.1
[SERVER_SOFTWARE] =&gt; Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2
[THE_REQUEST] =&gt; GET /protest/adf HTTP/1.1
[TIME] =&gt; 20080820014309
[TIME_DAY] =&gt; 20
[TIME_HOUR] =&gt; 01
[TIME_MIN] =&gt; 43
[TIME_MON] =&gt; 08
[TIME_SEC] =&gt; 09
[TIME_WDAY] =&gt; 3
[TIME_YEAR] =&gt; 2008
</pre>
<h3>Request using HTTPS</h3>
<pre class='brushhtaccess'>
[API_VERSION] =&gt; 20020903:12
[AUTH_TYPE] =&gt; Digest
[DOCUMENT_ROOT] =&gt; /home/user/www_root/askapache.com
[HTTPS] =&gt; on
[HTTP_ACCEPT] =&gt; text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
[HTTP_COOKIE] =&gt; PHPSESSID=752ee6d56e15f305233e30045987e5ce568c034; __qca=1176541225-59967328-5223185;
[HTTP_HOST] =&gt; www.askapache.com
[HTTP_REFERER] =&gt; http://www.askapache.com/protest/index.php?askapache=awesomeness&#038;you=rock
[HTTP_USER_AGENT] =&gt; Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16
[IS_SUBREQ] =&gt; false
[QUERY_STRING] =&gt; hi=you&#038;whats=&amp;you
[REMOTE_ADDR] =&gt; 22.162.144.211
[REMOTE_HOST] =&gt; 22.162.144.211
[REMOTE_PORT] =&gt; 4605
[REMOTE_USER] =&gt; administrator
[REQUEST_FILENAME] =&gt; /home/user/www_root/askapache.com/protest/index.php
[REQUEST_METHOD] =&gt; GET
[REQUEST_URI] =&gt; /protest/index.php
[SCRIPT_FILENAME] =&gt; /home/user/www_root/askapache.com/protest/index.php
[SCRIPT_GROUP] =&gt; daemonu
[SCRIPT_USER] =&gt; askapache
[SERVER_ADDR] =&gt; 208.113.134.190
[SERVER_ADMIN] =&gt; webmaster@askapache.com
[SERVER_NAME] =&gt; www.askapache.com
[SERVER_PORT] =&gt; 443
[SERVER_PROTOCOL] =&gt; HTTP/1.1
[SERVER_SOFTWARE] =&gt; Apache/2.0.61 (Unix) PHP/4.4.7 mod_ssl/2.0.61 OpenSSL/0.9.7e mod_fastcgi/2.4.2 DAV/2
[THE_REQUEST] =&gt; GET /protest/index.php?hi=you&#038;whats=&amp;you HTTP/1.1
[TIME] =&gt; 20080820015016
[TIME_DAY] =&gt; 20
[TIME_HOUR] =&gt; 01
[TIME_MIN] =&gt; 50
[TIME_MON] =&gt; 08
[TIME_SEC] =&gt; 16
[TIME_WDAY] =&gt; 3
[TIME_YEAR] =&gt; 2008
</pre>
<h2>Emulating ErrorDocuments with Mod_Rewrite</h2>
<p>The ErrorDocument directive is helpful because an errordocument is called differently then a normal file, and it contains special variables to help an admin debug.</p>
<p>I&#8217;ve wanted to use a RewriteCond + a RewriteRule to cause an Apache ErrorDocument to be displayed for a long time&#8230; I finally figured it out.  Simply use the <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html">HTTP STATUS CODE trick</a> in combination with a simple RewriteRule to trigger an Apache ErrorDocument.</p>
<p>This code emulates the internal 404 process Apache goes through.. If the file is not found it requests the /test/trigger-error/404 internally which triggers the 404 ErrorDocument.</p>
<pre class='brushhtaccess'>
ErrorDocument 404 /test/errordocument/404.html
Redirect 404 /test/trigger-error/404
&nbsp;
RewriteEngine On
RewriteBase /
RewriteCond %{ENV:REDIRECT_STATUS} !=404
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /test/trigger-error/404 [L]
</pre>
<p><strong>Big Deal..</strong> you might say&#8230; well consider that this works with any status code, and using this method you now have the power to trigger any errordocument page based on any kind of rewritecond.  I&#8217;ll be writing about some practical uses for this powerful method in the coming weeks, but heres a good example now so you can see how it can be used.</p>
<p>This bit of code Triggers the <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#status-505">505 HTTP Version Not Supported</a> When a request is made to the server with a protocol other than 1.1.</p>
<pre class='brushhtaccess'>
ErrorDocument 505 /test/errordocument/505.html
Redirect 505 /test/trigger-error/505
&nbsp;
RewriteEngine On
RewriteBase /
&nbsp;
RewriteCond %{ENV:REDIRECT_STATUS} !=505
RewriteCond %{THE_REQUEST} !^[A-Z]{3,9}\ /.*\ HTTP/(0\.9|1\.0|1\.1) [NC]
RewriteRule .* /test/trigger-error/505 [L]
</pre>
<p class="anote"><strong>YES!</strong> I realize I didn&#8217;t explain that very well, I didn&#8217;t realize it was that complicated..  I wanted to go into how to use these advanced tricks and methods to achieve some really cool stuff, but explaining just this little bit took me awhile and I&#8217;m out of page space!</p>
<p>So play around with this and I&#8217;ll post back some of the <em>untapped sicknesses</em> you can give a website with such powerful methods at your disposal.</p>
<blockquote cite="http://httpd.apache.org/"><p>
<cite><strong>Ralf S. Engelschall</strong></cite></p>
<pre>
/*
 *  URL Rewriting Module
 *
 *  This module uses a rule-based rewriting engine (based on a
 *  regular-expression parser) to rewrite requested URLs on the fly.
 *
 *  It supports an unlimited number of additional rule conditions (which can
 *  operate on a lot of variables, even on HTTP headers) for granular
 *  matching and even external database lookups (either via plain text
 *  tables, DBM hash files or even external processes) for advanced URL
 *  substitution.
 *
 *  It operates on the full URLs (including the PATH_INFO part) both in
 *  per-server context (httpd.conf) and per-dir context (.htaccess) and even
 *  can generate QUERY_STRING parts on result.   The rewriting result finally
 *  can lead to internal subprocessing, external request redirection or even
 *  to internal proxy throughput.
 *
 *  This module was originally written in April 1996 and
 *  gifted exclusively to the The Apache Software Foundation in July 1997 by
 *
 *      Ralf S. Engelschall
 *      rse engelschall.com
 *      www.engelschall.com
 */
</pre>
</blockquote>
<p><a href="http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html">Crazy Advanced Mod_Rewrite Tutorial</a> originally appeared on AskApache.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/lH-LZtbDykS0-4krikAamREdjC4/0/da"><img src="http://feedads.g.doubleclick.net/~a/lH-LZtbDykS0-4krikAamREdjC4/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/lH-LZtbDykS0-4krikAamREdjC4/1/da"><img src="http://feedads.g.doubleclick.net/~a/lH-LZtbDykS0-4krikAamREdjC4/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.askapache.com/~ff/apache/htaccess?a=C_WZMW2_cog:uh9ecytl5P4:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=C_WZMW2_cog:uh9ecytl5P4:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=C_WZMW2_cog:uh9ecytl5P4:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=C_WZMW2_cog:uh9ecytl5P4:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=C_WZMW2_cog:uh9ecytl5P4:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		<feedburner:origLink>http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html</feedburner:origLink></item>
		<item>
		<title>mod_rewrite Fix for Caching Updated Files</title>
		<link>http://feeds.askapache.com/~r/apache/htaccess/~3/UMVK14sKBJc/mod_rewrite-fix-for-caching-updated-files.html</link>
		<comments>http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html#comments</comments>
		<pubDate>Sun, 30 Aug 2009 13:20:59 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[Cache-Control]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[If-Modified-Since]]></category>

		<guid isPermaLink="false">http://www.askapache.com/htaccess/mod_rewrite-code-to-fix-caching-updated-files.html</guid>
		<description><![CDATA[<p>Web Developers sometimes use <code>file.ext?v=004</code> as a version control system to force visitors to use updated files.  <strong>This is terrible.</strong>  Instead link to <code>apache-003.css</code> and set it to be cached forever. When you change the file you just change the links to <code>apache-004.css</code>. That eliminates millions of bandwidth and resource robbing If-Modified-Since requests. You only need Apache with mod_rewrite, and 1-10 minutes!</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Web Developers sometimes use</strong> <code>file.ext?v=137</code> as a <strong>version control system</strong> so they can force visitors to use an updated file.  <strong>This is so terrible</strong>.  Instead link to <code>apache-003.css</code> and set it to be cached forever. When you change the file you just change the links to <code>apache-004.css</code>.</p>
<h2>Raw Speed Benefit</h2>
<p>This eliminates millions of bandwidth and resource robbing <code>304 If-Modified-Since</code> requests.</p>
<hr />
<h2>Renaming links vs. Renaming files</h2>
<p>On the server my files are named <strong>apache.css</strong> and <strong>apache.js</strong>, but in the xhtml I point to them using the names <code>apache-113.css</code> and <code>apache-113.js</code>, after I change the file I just add 1 to the number, and the new file is cached. They are internally redirected to apache.css and apache.js (invisible to the user) The concept is similar to a &#8220;shortcut&#8221; in windows or a symlink in BSD.  The trick is that I never actually rename the files on the server.  I just rename them in the html.  That means <code>apache-135.css</code> is served from the file apache.css but the browser/cache only see and know about <code>apache-135.css</code>.</p>
<h2>XHTML</h2>
<p><strong>NOTE</strong>: You can do your own investigating of this sites source code and <a href="http://www.askapache.com/online-tools/http-headers-tool/">HTTP headers</a> to see this whole system in action</p>
<pre>
&lt;link href="http://z.askapache.com/z/c/apache-0031.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="http://z.askapache.com/z/j/apache-0031.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<h2>mod_rewrite code for htaccess or httpd.conf</h2>
<p><strong>Updated:</strong> 10/20/2008</p>
<pre>
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ /z/([a-z]+)/(.+)-([0-9]+)\.(js|css).*\ HTTP/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .+ /z/%2/%3.%5 [NC,L]
</pre>
<h3>Alternate mod_rewrite code</h3>
<pre>
RewriteEngine On
RewriteBase /
RewriteRule ^([cij]+)(/?[a-z]*)/([a-z]+)-([0-9]+)\.([a-z]+)$ /$1$2/$3.$5 [L]
</pre>
<h2>Ideal Caching Scheme</h2>
<p>Ok so you want the xhtml to be the only file that isn&#8217;t cached without being validated, its simple to <a href="http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-caching.html" title="Speed Up Sites with htaccess Caching">setup your own caching scheme</a>.</p>
<h3>Bad Cache information for a file with the <code>?v=foo</code> hack</h3>
<blockquote><p>This object will be fresh for 1 week. It can be validated with Last-Modified. This object requests that a Cookie be set; this makes it and other pages affected automatically stale; clients must check them upon every request. Because it contains a query (&#8216;?&#8217;) in the URL, many caches will not keep this object.</p>
</blockquote>
<p><a href="http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html">mod_rewrite Fix for Caching Updated Files</a> originally appeared on AskApache.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/C54wnE6wpFlQNzTXU6g7WZJvGOg/0/da"><img src="http://feedads.g.doubleclick.net/~a/C54wnE6wpFlQNzTXU6g7WZJvGOg/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/C54wnE6wpFlQNzTXU6g7WZJvGOg/1/da"><img src="http://feedads.g.doubleclick.net/~a/C54wnE6wpFlQNzTXU6g7WZJvGOg/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.askapache.com/~ff/apache/htaccess?a=UMVK14sKBJc:H5x9nFPtBUU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=UMVK14sKBJc:H5x9nFPtBUU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=UMVK14sKBJc:H5x9nFPtBUU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=UMVK14sKBJc:H5x9nFPtBUU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=UMVK14sKBJc:H5x9nFPtBUU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html</feedburner:origLink></item>
		<item>
		<title>Custom bash_profile for Advanced Shell Users</title>
		<link>http://feeds.askapache.com/~r/apache/htaccess/~3/-67b1YGaPtY/bash_profile-functions-advanced-shell.html</link>
		<comments>http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html#comments</comments>
		<pubDate>Sun, 23 Aug 2009 18:32:26 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[.bashrc]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[alias]]></category>
		<category><![CDATA[bash]]></category>
		<category><![CDATA[bash alias]]></category>
		<category><![CDATA[bash_profile]]></category>
		<category><![CDATA[function]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[shell script]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3183</guid>
		<description><![CDATA[<p class="anote">Want to get started with my custom bash file without reading this page <strong>(recommended as page is not updated)</strong>?  Execute the following in your shell and rock and roll.</p>
<pre>
curl -O http://z.askapache.com/askapache-bash-profile.txt &#038;& . askapache-bash-profile.txt
</pre>
]]></description>
			<content:encoded><![CDATA[<p>Looking for some advanced uses for the shell?  Function examples?  Advanced shell settings?  Here is some of my best.</p>
<p class="anote">Want to get started without even having to read this page?  Type the following in your shell.</p>
<pre>
curl -O http://z.askapache.com/askapache-bash-profile.txt &#038;&#038; source askapache-bash-profile.txt
</pre>
<p>For those of you power users and server admins that use Bash, ksh, csh, vanilla sh, etc.., or if you are just passionate about shell scripting, because it allows you to get advanced tasks done fast and efficiently, not to mention automated automatically.  I give you my .bash_profile file.   You should edit it to fit your needs, (especially the exported vars like PATH, LDFLAGS, if you don&#8217;t understand something just comment it out) but it&#8217;s pretty universal because I work on alot of other people&#8217;s servers not to mention many different distros and platforms, and when I get hired to do some server work through a shell, I bring this script along for the ride.</p>
<p><a href="/wp-content/uploads/2009/08/askapache-bash_profile.png"><img src="/wp-content/uploads/2009/08/askapache-bash_profile.png" alt="askapache-bash_profile" title="askapache-bash_profile" width="571" height="2879" /></a></p>
<h2>askapache-bash-profile.txt</h2>
<p>You can download the latest version: <a href="http://z.askapache.com/askapache-bash-profile.txt">http://z.askapache.com/askapache-bash-profile.txt</a></p>
<p>The functions and variables below are the way bash sees them, using declare -f, and alias, to make it easier for you to read and understand them.    The actual file at <a href="http://z.askapache.com/askapache-bash-profile.txt">http://z.askapache.com/askapache-bash-profile.txt</a> will always be the most updated version, as I use it personally.  And it has the whole file the way I wrote it, meaning many extra notes and much simpler to follow. Enjoy!</p>
<pre>
#!/bin/bash
#
# To install the latest version
#
# curl -O http://z.askapache.com/askapache-bash-profile.txt &#038;&#038; source askapache-bash-profile.txt
#
# To run automatically at login: In your ~/.bash_profile or similar login script do
# [[ -r path-to-askapache-bash-profile.txt ]] &#038;&#038; source path-to-askapache-bash-profile.txt
#
&nbsp;
AAPN=&#039;AskApache Bash Profile Script&#039;
AAPV=&#039;5.6&#039;
AAPT=&#039;2009-22-2009&#039;
AAPS=`echo "$0" | sed -e &#039;s,.*/,,&#039;`
&nbsp;
############################################################################################################################################################
# Copyright (C) 2009 www.AskApache.com
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see &lt;http://www.gnu.org/licenses/&gt;.
############################################################################################################################################################
&nbsp;
# dont do anything for non-interactive shells
[[ -z "$PS1"  ]] &#038;&#038; return
&nbsp;
# bash defines the following built-in commands:
#   :, ., [, alias, bg, bind, break, builtin, case, cd, command, compgen, complete, continue, declare, dirs
#   disown, echo, enable, eval, exec, exit, export, fc, fg, getopts, hash, help, history, if, jobs, kill,
#   let, local, logout, popd, printf, pushd, pwd, read, readonly, return, set, shift, shopt, source, suspend
#   test, times, trap, type, typeset, ulimit, umask, unalias, unset, until, wait, while
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# The first digit selects the set user ID (4) and set group ID (2) and sticky (1) attributes.
# The second digit selects permissions for the user who owns the file: read (4), write (2), and execute (1)
# The third selects permissions for other users in the file&#039;s group, with the same values
# The fourth for other users not in the file&#039;s group, with the same values.
# [see man chmod, help umask]
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
umask 0022
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# Trapping Signals to Catch Errors
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# 1      2      3       4      5       6       7      8      9       10      11      12      13      14      15      17      18      19      20      21
# SIGHUP SIGINT SIGQUIT SIGILL SIGTRAP SIGABRT SIGBUS SIGFPE SIGKILL SIGUSR1 SIGSEGV SIGUSR2 SIGPIPE SIGALRM SIGTERM SIGCHLD SIGCONT SIGSTOP SIGTSTP SIGTTIN
# [see man bash, man signal, help trap]
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
trap &#039;echo -e "\n\n\n!!! TERMINATED SIG: [$?] AT LINE:$LINENO AFTER $SECONDS SECONDS !!!\n"|tee -a `tty 2&gt;/dev/null`;&#039; 15
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# Advanced Shell Limits
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# -S      use the `soft&#039; resource limit
# -H      use the `hard&#039; resource limit
# -a      all current limits are reported
# -c      the maximum size of core files created
# -d      the maximum size of a process&#039;s data segment
# -f      the maximum size of files created by the shell
# -l      the maximum size a process may lock into memory
# -m      the maximum resident set size
# -n      the maximum number of open file descriptors
# -p      the pipe buffer size
# -s      the maximum stack size
# -t      the maximum amount of cpu time in seconds
# -u      the maximum number of user processes
# -v      the size of v
# [see man getrlimit, help ulimit]
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
ulimit -S -c 0 # Don&#039;t want any coredumps
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# Advanced Shell (set)tings
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# e [errexit] Exit immediately if a command exits with a non-zero status.
# B [braceexpand] The shell will perform brace expansion.
# h [hashall] Remember the location of commands as they
# f [noglob]      Disable file name generation (globbing).
# H [histexpand]  Enable ! style history substitution.
# v [verbose]     Print shell input lines as they are read.
# x [xtrace]      Print commands and their arguments as they are executed.
# n [noexec]      Read commands but do not execute them.
# [history] Enable command history
# [see man bash, help set]
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
set +C +f +H +v +x +n -b -h -i -m -B
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# Advanced Shell (shopt)ions
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# cdable_vars             an argument to the cd builtin command that is not a directory is assumed to be the name of a variable dir to change to.
# cdspell                 minor errors in the spelling of a directory component in a cd command will be corrected.
# checkhash               bash checks that a command found in the hash table exists before execute it.  If no longer exists, a path search is performed.
# checkwinsize            bash checks the window size after each command and, if necessary, updates the values of LINES and COLUMNS.
# cmdhist                 bash attempts to save all lines of a multiple-line command in the same history entry.  Allows re-editing of multi-line commands.
# dotglob                 bash includes filenames beginning with a `.&#039; in the results of pathname expansion.
# execfail                a non-int shell will not exit if it cannot execute the file specified as an argument to the exec builtin command, like int sh.
# expand_aliases          aliases are expanded as described above under ALIASES.  This option is enabled by default for interactive shells.
# extglob                 the extended pattern matching features described above under Pathname Expansion are enabled.
# histappend              the history list is appended to the file named by the value of the HISTFILE variable when shell exits, no overwriting the file.
# hostcomplete            and readline is being used, bash will attempt to perform hostname completion when a word containing a @ is being completed
# huponexit               bash will send SIGHUP to all jobs when an interactive login shell exits.
# interactive_comments    allow a word beginning with # to cause that word and all remaining characters on that line to be ignored in an interactive shell
# lithist                 if cmdhist option is enabled, multi-line commands are saved to the history with embedded newlines rather than using semicolon
# login_shell             shell sets this option if it is started as a login shell (see INVOCATION above).  The value may not be changed.
# mailwarn                file that bash is checking for mail has been accessed since the last checked, &#96;`The mail in mailfile has been read&#039;&#039; is displayed.
# no_empty_cmd_completion bash will not attempt to search the PATH for possible completions when completion is attempted on an empty line.
# nocaseglob              bash matches filenames in a case-insensitive fashion when performing pathname expansion (see Pathname Expansion above).
# nullglob                bash allows patterns which match no files (see Pathname Expansion above) to expand to a null string, rather than themselves.
# progcomp                the programmable completion facilities (see Programmable Completion above) are enabled.  This option is enabled by default.
# promptvars              prompt strings undergo variable and parameter expansion after being expanded as described in PROMPTING above.
# shift_verbose           the shift builtin prints an error message when the shift count exceeds the number of positional parameters.
# sourcepath              the source (.) builtin uses the value of PATH to find the directory containing the file supplied as an argument.
# xpg_echo                the echo builtin expands backslash-escape sequences by default.
# [see man bash, help shopt]
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
shopt -s histappend cmdhist extglob no_empty_cmd_completion checkwinsize progcomp sourcepath cdspell cdable_vars checkhash histreedit histverify
shopt -u mailwarn; unset MAILCHECK # dont notify for new mail
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
# CUSTOM SETTING VARIABLES
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
&nbsp;
# quicker, cleaner ref
export N6=/dev/null
&nbsp;
# if a program exists in path
function have()
{ unset -v have; PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin; type $1 &&gt;/$N6 &#038;&#038; have="yes"; }
&nbsp;
[[ -z ${USER:=""} ]] &#038;&#038; export USER=`whoami 2&gt;$N6 || id -un 2&gt;$N6 || logname 2&gt;$N6`
[[ -z ${HOME:=""} ]] &#038;&#038; export HOME=$(command pwd -L)
&nbsp;
export HOME=${HOME:-~};
export SHELL=${SHELL:-/bin/bash}
have tty &#038;&#038; export SSHTTY=`tty 2&gt;$N6`
&nbsp;
export TZ=&#039;America/Indianapolis&#039;
[[ -z "$HOST" ]] &#038;&#038; export HOST=`hostname 2&gt;$N6||uname -n 2&gt;$N6`
&nbsp;
# DEFINATELY EDIT THIS STUFF, is pretty good at setting path
#JAVA_HOME=/usr/local/jdk
#P=${PATH}:$HOME/bin:$HOME/sbin:/bin:/etc:/sbin:/usr/local/bin:/usr/sbin:/usr/X11R6/bin:/usr/bin:/usr/bin/mh:/usr/libexec:/etc/X11:/etc/X11/xinit:$HOME/.gem/ruby/1.8/bin
#P=${P}:/usr/local/dh/apache/template/bin:/usr/local/dh/apache2/template/bin:/usr/local/dh/apache2/template/build:/usr/local/dh/apache2/template/sbin
#P=${P}:/usr/local/dh/bin:/usr/local/dh/java/bin:/usr/local/dh/java/jre/bin:/usr/local/php5/bin:.
#PATH=$P
GP=; for p in ${PATH//:/ }; do [[ -d $p &#038;&#038; -x $p ]] &#038;&#038; [[ "${GP}s" == s ]] &#038;&#038; GP=$p || GP=${GP}:$p; done; export PATH=$GP
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
# LIBS / COMPILES - EDIT
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
#LDFLAGS="-L${HOME}/lib -L/lib -L/usr/lib -L/usr/lib/libc5-compat -L/lib/libc5-compat -L/usr/i486-linuxlibc1/lib -L/usr/X11R6/lib"; LD_LIBRARY_PATH=$HOME/lib; CPPFLAGS="-I${HOME}/include"
#export LDFLAGS LD_LIBRARY_PATH CPPFLAGS
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
# MAIL, PROGRAMS, EDITOR
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;&#45;-
have nano &#038;&#038; export EDITOR="`type -P nano`" &#038;&#038; export VISUAL=$EDITOR
have lynx &#038;&#038; export BROWSER="`type -P lynx`"
&nbsp;
#alias man=&#039;man -H&#039;
#[[ -r $HOME/.lynx/lynx.cfg ]] &#038;&#038; export LYNX_CFG=$HOME/.lynx/lynx.cfg
#[[ -r $HOME/var/locatedb ]] &#038;&#038; export LOCATE_PATH=$HOME/var/locatedb
&nbsp;
alias more=&#039;less&#039;
export PAGER=less
export LESSCHARSET=&#039;latin1&#039;
have lesspipe &#038;&#038; export LESSOPEN=&#039;|/usr/bin/lesspipe %s 2&gt;&#038;-&#039; &#038;&#038; export LESS=&#039;-i -N -w  -z-4 -g -e -M -X -F -R -P%t?f%f :stdin .?pb%pb\%:?lbLine %lb:?bbByte %bb:-&#46;..&#039;
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# PROMPT
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# \a     an ASCII bell character (07)
# \d     the date in "Weekday Month Date" format (e.g., "Tue May 26")
# \D{format}  the format is passed to strftime(3) and the result is inserted into the prompt string;
# \e     an ASCII escape character (033)
# \h     the hostname up to the first `.&#039;
# \H     the hostname
# \j     the number of jobs currently managed by the shell
# \l     the basename of the shell&#039;s terminal device name
# \n     newline
# \r     carriage return
# \s     the name of the shell, the basename of $0 (the portion following the final slash)
# \t     the current time in 24-hour HH:MM:SS format
# \T     the current time in 12-hour HH:MM:SS format
# \@     the current time in 12-hour am/pm format
# \A     the current time in 24-hour HH:MM format
# \u     the username of the current user
# \v     the version of bash (e.g., 2.00)
# \V     the release of bash, version + patchelvel (e.g., 2.00.0)
# \w     the current working directory
# \W     the basename of the current working directory
# \!     the history number of this command
# \#     the command number of this command
# \$     if the effective UID is 0, a #, otherwise a $
# \nnn   the character corresponding to the octal number nnn
# \\     a backslash
# \[     begin a sequence of non-printing characters, which could be used to embed a terminal control sequence into the prompt
# \]     end a sequence of non-printing characters
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
&nbsp;
case ${TERM:-dummy} in linux*|con80*|con132*|console|xterm*|vt*|screen*|putty|Eterm|dtterm|ansi|rxvt|gnome*|*color*)COLORTERM=yes; ;; *) COLORTERM=no; ;; esac; export COLORTERM
PS1="\n[`date +%m/%d`][\u@\h][\w]($SHLVL:\!)\n$ "; X=;R=;
[[ "$COLORTERM" == yes ]] &#038;&#038; X=&#039;\033[1;37m&#039; &#038;&#038; R=&#039;\033[0;00m&#039; &#038;&#038; PS1="\n[`date +%m/%d`]\e[1;37m[\e[0;32m\u\e[0;35m@\e[0;32m\h\e[1;37m]\e[1;37m[\e[0;31m\w\e[1;37m]($SHLVL:\!)\n\[${X}\]\$ "
export PS1 R X
&nbsp;
# If set, the value is executed as a command prior to issuing each primary prompt.
have tty &#038;&#038; export SSHTTY=$(tty 2&gt;$N6);
[[ -z "$SSHTTY" ]] || export PROMPT_COMMAND=&#039;echo -ne "\033]0;$USER:`id -gn 2&gt;$N6`@$HOSTNAME `tty 2&gt;$N6`  [`uptime 2&gt;$N6|sed -e "s/.*: \([^,]*\).*/\1/" -e "s/ //g"` / `command ps aux|wc -l`]  `command w|wc -l` users \007"&#039;
unset PROMPT_COMMAND
&nbsp;
# used by functions below
export RJ=0;
declare -a CC;
export L1=$(seq -s_ 1 75|tr -d [0-9]);
export L2=$(echo $L1|tr &#039;_&#039; &#039; &#039;)
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# ls aliases
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
C=&#039; &#45;-color=auto&#039;
alias la="command ls -Al${C}"      # show hidden files
alias lx="command ls -lAXB${C}"    # sort by extension
alias lk="command ls -lASr${C}"    # sort by size
alias lc="command ls -lAcr${C}"    # sort by change time
alias lu="command ls -lAur${C}"    # sort by access time
alias lr="command ls -lAR${C}"     # recursive ls
alias lt="command ls -lAtr${C}"    # sort by date
alias lll="stat -c %a\ %N\ %G\ %U \$PWD/*|sort"
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# safety aliases
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
alias chmod=&#039;command chmod -c&#039;
alias mkdir=&#039;command mkdir -pv&#039;
alias rm=&#039;command rm -v&#039;
alias cp=&#039;command cp -v&#039;
alias mv=&#039;command mv -v&#039;
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# func aliases
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
alias who=&#039;command who -ar -pld&#039;
alias which=&#039;command type -path&#039;
have tree || alias tree=&#039;command -lsFR&#039;
have tree &#038;&#038; alias tree=&#039;command tree -Csuflapi&#039;
alias top=&#039;top -c&#039;
alias vim=&#039;command vim &#45;-noplugin&#039;
alias du=&#039;command du -kh&#039;
alias df=&#039;command df -kTh&#039;
[[ $UNAME != Linux ]] &#038;&#038; have gsed &#038;&#038; alias sed=gsed
#alias php=&#039;php -d display_errors=true&#039;
#alias man=&#039;man -H&#039;
#alias ldconfig="ldconfig -v -f ${HOME}/etc/ld.so.conf -C ${HOME}/etc/ld.so.cache"
alias path=&#039;echo -e ${PATH//:/\\n}&#039;
&nbsp;
alias pp=&#039;command ps -HAcl -F S -A f&#039;
alias p=&#039;command ps -HAcl -F S -A f|uniq -w3&#039;
alias ps2=&#039;command ps -H&#039;
alias ps1=&#039;command ps -lFA&#039;
&nbsp;
alias df1=&#039;command df -iTa&#039;
alias n="${EDITOR}"3
alias inice=&#039;ionice -c3 -n7 nice&#039;
alias vdir="ls &#45;-format=long"
alias dir="ls &#45;-format=vertical"
alias killphp=&#039;pkill -9 -f php.cgi\|php5.cgi\|php-cgi\|php\|php4.cgi;pkill -13 -f php.cgi\|php5.cgi\|php-cgi\|php\|php4.cgi&#039;
alias dsiz=&#039;du -sk * | sort -n &#45;-&#039;
alias lessc=&#039;ccze -A |/usr/bin/less -R&#039;
alias h=&#039;history&#039;
alias j=&#039;jobs -l&#039;
alias ..=&#039;cd ..&#039;
alias wtf=&#039;watch -n 1 w -hs&#039;
&nbsp;
# spelling typos
alias kk=&#039;ll&#039;
alias xs=&#039;cd&#039;
alias vf=&#039;cd&#039;
alias moer=&#039;more&#039;
alias moew=&#039;more&#039;
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# history setup
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# HISTCONTROL
#    If  set  to a value of ignorespace, lines which begin with a space character are not entered on the history list.
#    If set to a value of ignoredups, lines matching the last history line are not entered.  A value of ignoreboth combines the two options.
#    If unset, or if set to any other value than those above, all lines read by the parser are saved on the history list, subject to the value of HISTIGNORE.
# HISTFILE
#    The name of the file in which command history is saved (see HISTORY below).  The default value is ~/.bash_history.  If unset, the command history is not saved when an interactive shell exits.
# HISTFILESIZE
#    The  maximum number of lines contained in the history file.  When this variable is assigned a value, the history file is truncated, if necessary, to contain no more than that number of lines.
#    The default value is 500.  The history file is also trun-cated to this size after writing it when an interactive shell exits.
# HISTIGNORE
#    A colon-separated list of patterns used to decide which command lines should be saved on the history list.  Each pattern is anchored at the beginning of the line and must match the complete line (no implicit `*&#039; is appended).
#    Each pattern is  tested against  the  line  after  the  checks  specified  by HISTCONTROL are applied.  In addition to the normal shell pattern matching characters, `&#038;&#039; matches the previous history line.
#    `&#038;&#039; may be escaped using a backslash; the backslash is removed before attempting a match.  The second and subsequent lines of a multi-line compound command are not tested, and are added to the history regardless of the value of HISTIGNORE.
# HISTSIZE
#    The number of commands to remember in the command history (see HISTORY below).  The default value is 500.
#
HISTMASTER=;HISTCONTROL=;HISTIGNORE=;HISTSIZE=;HISTFILESIZE=;HISTFILE=;HISTTIMEFORMAT=;
function asetup_history()
{
  HISTMASTER=${HISTMASTER:-$HOME/backups/.history/combined.log}
  HISTCONTROL=${HISTCONTROL:-&#039;ignoreboth&#039;}
  HISTTIMEFORMAT="%H:%M &gt; "
  HISTIGNORE=${HISTIGNORE:-&#039;clear:ll:ls:./_sbackup.sh:./_logview.sh:ps:updatedb:top&#039;}
  HISTSIZE=${HISTSIZE:-5000000}
  HISTFILESIZE=${HISTFILESIZE:-5000000}
  HISTFILE=${HISTFILE:-$HOME/.bash_history}
  export HISTMASTER HISTCONTROL HISTIGNORE HISTSIZE HISTFILESIZE HISTFILE HISTTIMEFORMAT
}
&nbsp;
function h1()
{ cat $HISTFILE $HISTMASTER | command grep $1 | sort | uniq | command grep &#45;-color=always $1; }
&nbsp;
function h2()
{ cat $HISTFILE $HISTMASTER | command grep $1 | sort | uniq; }
&nbsp;
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# personalized colors
#&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-&#45;&#45;-
# Attribute codes:        00=none 01=bold 04=underscore 05=blink 07=reverse 08=concealed
# Text color codes:       30=black 31=red 32=green 33=yellow 34=blue 35=magenta 36=cyan 37=white
# Background color codes: 40=black 41=red 42=green 43=yellow 44=blue 45=magenta 46=cyan 47=white
# NORMAL 00       # global default, although everything should be something.
# FILE 00         # normal file
# DIR 01;34       # directory
# LINK 01;36      # symbolic link.
# FIFO 40;33      # pipe
# SOCK 01;35      # socket
# DOOR 01;35      # door
# BLK 40;33;01    # block device driver
# CHR 40;33;01    # character device driver
# ORPHAN 40;31;01 # symlink to nonexistent file
# EXEC 01;32      # executables
LS_COLORS=;LS_OPTIONS=;
function asetup_colors(){
 local L; eval "`dircolors -b`";
 [[ "$COLORTERM" == no ]] &#038;&#038; return
 export LS_COLORS
 unset LS_OPTIONS
}
&nbsp;
function ascript_title(){
  clear; echo; echo; lin 0;
  echo -e "| ${CC[2]}             ___       __    ___                 __                     ${CC[0]} |"
  echo -e "| ${CC[2]}            / _ | ___ / /__ / _ | ___  ___ _____/ /  ___                ${CC[0]} |"
  echo -e "| ${CC[9]}           / __ |(_-&lt;/  &#039;_// __ |/ _ \/ _ \`/ __/ _ \/ -_)               ${CC[0]} |"
  echo -e "| ${CC[9]}          /_/ |_/___/_/\_\/_/ |_/ .__/\_,_/\__/_//_/\__/                ${CC[0]} |"
  echo -e "| ${CC[9]}                               /_/                                      ${CC[0]} |";
  lin 1; lin 2 "${1:-$AAPN}"; lin 2 "Version ${2:-$AAPV}"; lin 2 "Build: ${3:-$AAPT}"; lin 3;sleep 2;
}
&nbsp;
###########################################################################&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-#
###
### FUNCTIONS
###
###########################################################################==-==-==-==-==-==-==-==-==-==-==#
&nbsp;
#export SMSO=$(tput smso &&gt;$N6);export RMSO=$(tput rmso &&gt;$N6);
#find . -type f -iname &#039;*htaccess*&#039; -print0 | xargs -0 grep -sn -i "THE_REQUEST" | sed "s/THE_REQUEST/${SMSO}\0$RMSO}/gI"
&nbsp;
function repeat()
{ local i max=$1; shift; for ((i=1; i &lt;= max ; i++)); do eval "$@"; done; }
&nbsp;
function cuttail()
{ sed -n -e :a -e "1,${2:-10}!{P;N;D;};N;ba" $1; }
&nbsp;
function quote()
{ echo \&#039;${1//\&#039;/\&#039;\\\&#039;\&#039;}\&#039;; }
&nbsp;
function dequote()
{ eval echo "$1"; }
&nbsp;
function get_pids_on_system()
{ command ps axo pid|sed 1d; }
&nbsp;
function get_pgids_on_system()
{ command ps axo pgid|sed 1d; }
&nbsp;
function get_users_on_system()
{ have getent &&gt;$N6 &#038;&#038; getent passwd|awk -F: &#039;{print $1}&#039; &#038;& return; awk &#039;BEGIN {FS=":"} {print $1}&#039; /etc/passwd; }
&nbsp;
function get_groups_on_system()
{ have getent &&gt;$N6 &#038;&#038; getent group|awk -F: &#039;{print $1}&#039; &#038;& return; awk &#039;BEGIN {FS=":"} {print $1}&#039; /etc/group; }
&nbsp;
function get_inet_interface_ips()
{ have ip &#038;&#038; /bin/ip -o -f inet addr|sed -e &#039;/inet 10./d&#039; -e &#039;s/\/24//g&#039; |awk &#039;{print $4}&#039;|sed -e "s/\\n//g" -e &#039;/.*\.0$/d&#039;; }
&nbsp;
function personalized_wget()
{
 exec 6&gt;&#038;1 ; exec &gt; ${1:-$HOME/.wgetrc}
 echo &#039;header = Accept-Language: en-us,en;q=0.5&#039;
 echo &#039;header = Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5&#039;
 echo &#039;header = Accept-Encoding: gzip,deflate&#039;
 echo &#039;header = Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7&#039;
 echo &#039;header = Keep-Alive: 300&#039;
 echo &#039;user_agent = Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6&#039;
 echo &#039;referer = http://www.google.com&#039;
 echo &#039;robots = off&#039;
 exec 1&gt;&#038;6 6&gt;&#038;-
}
&nbsp;
function mkdir()
{
 local e=0;
 for f in ${1+"$@"};do
 set fnord `echo ":$f"|sed -e &#039;s/^:\//%/&#039; -e &#039;s/^://&#039; -e &#039;s/\// /g&#039; -e &#039;s/^%/\//&#039;`;shift;pp=;for d in ${1+"$@"};do pp="$pp$d";
 case "$pp" in -*)pp=./$pp; ;; ?:)pp="$pp/";continue ;; esac; [[ ! -d "$pp" ]] &#038;&#038; mkdir -v "$pp"||e=$?; pp="$pp/"; done;
 done; return  $e
}
&nbsp;
function clean_exit()
{ lin 0;lin 1;lin 2 "COMPLETED SUCCESSFULLY";lin 1;lin 3; }
&nbsp;
function dirty_exit()
{ echo "See ya..";sleep 1;exit; }
&nbsp;
function set_window_title()
{ echo -n -e "\033]0;$*\007"; }
&nbsp;
function pd()
{ echo -e  "\n ${CC[15]} ${1:-DONE} $R\n\n" &gt;$SSHTTY; }
&nbsp;
function cont()
{ local ans; echo -en "\n ${CC[15]}[ ${1:-Press any key to continue} ]$R\n"; read -n 1 ans; }
&nbsp;
function do_sleep ()
{ echo -en "${CC[6]}${3:-.}" &gt;$SSHTTY;while [[ -d /proc/$RJ ]];do sleep ${2:-3};echo -en "${3:-.}" &gt;$SSHTTY;done;echo -e "${CC[0]}" &gt;$SSHTTY&#038;&#038;sleep 1&&pd; }
&nbsp;
function pwd()
{ command pwd -LP "$@"; }
&nbsp;
function kill_jobs(){
 for i in `jobs -p`; do kill -9 $i; done; }
&nbsp;
function beep_alarm()
{ local i; for i in `seq 0 ${1:-5}`;do echo -en "\a" &#038;&#038; sleep 1; done; }
&nbsp;
function lin()
{ case ${1:-1} in 0)echo -e "\n$R $L1"; ;; 1)echo -e "|$L2|"; ;; 2)echo -en "${R}|${CC[34]}";echo -en "${2:-1}"|sed -e :a -e &#039;s/^.\{1,72\}$/ &#038; /;ta&#039; -e "s/\(.*\)/\1/";echo -e "${R} |${R}" ;; 3)echo -e "$R $L1$R$X\n\n"; ;; esac; }
&nbsp;
function mp3info()
{ ls *.mp3 |xargs -ix 2&gt;&#038;1 ffmpeg -i x|grep -v "^Must" |grep -v "built\|libavutil\|libavcodec\|configuration\|FFmpeg\|libavformat"; }
&nbsp;
function tailit()
{ clear;echo "p e a ma md all | FILENAME"; sh ${HOME}/scripts/logview.sh "${2:-askapache.com}" "${1:-all}"; }
&nbsp;
function pm()
{ local S I=${1:-3};S=$SSHTTY;echo -en "$R\n";case ${2:-0} in 0)echo -en "${CC[6]}==&gt; $X$I$R" &gt;$S; ;; 3)echo -e "\n\n${CC[4]}:: $X$I$R\n" &gt;$S; ;; esac; }
&nbsp;
function yes_no()
{ local a YN=65; echo -en "${1:-Answer} [y/n] "; read -n 1 a; case $a in [yY]) YN=0; ;; esac; return $YN; }
&nbsp;
function l()
{ command ls -AhFp &#45;-color=auto "$@"; }
&nbsp;
function la()
{ du *|awk &#039;{print $2,$1}&#039;|sort -n|tr &#039; &#039; "\t"; }
&nbsp;
function ll()
{ command ls -lABls1c &#45;-color=auto "$@"; }
&nbsp;
function stat1()
{ local D=${1:-$PWD/*}; stat -c %a\ %A\ \ A\ %x\ \ M\ %y\ \ C\ %z\ \ %N ${D} |sed -e &#039;s/ [0-9:]\{8\}\.[0-9]\{9\} -[0-9]\+//g&#039; |tr  -d "\`\&#039;"|sort -r; }
&nbsp;
function stat2()
{ local D=${1:-$PWD/*}; stat -c %a\ %A\ \ A\ %x\ \ M\ %y\ \ C\ %z\ \ %N ${D} |sed -e &#039;s/\.[0-9]\{9\} -[0-9]\+//g&#039;|tr  -d "\`\&#039;"|sort -r; }
&nbsp;
#&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-=&#45;-#
# processes
#==-==-==-==-==-==-==-==-==-==-==#
function psu()
{ command ps -Hcl -F S f -u ${1:-$USER}; }
&nbsp;
function ps()
{ [[ -z "$1" ]] &#038;&#038; command ps -Hacl -F S -A f &#038;& return; command ps "$@"; }
&nbsp;
function make_nice()
{ have nice || return; pm "Making Nice $$"; pm 0 0; command renice ${1:-19} -p $$; pd; }
&nbsp;
function make_ionice()
{ have ionice || return; pm "Making IONice $$"; pm 0 0; command ionice -c${1:-3} -n7 -p $$; pd; }
&nbsp;
function dump_ps_environment()
{ command ps aux | grep ${USER:0:3} | awk &#039;{print $2}&#039; | xargs -t -ipid cat /proc/pid/environ; }
&nbsp;
function procinfo1()
{ PI=($(strace -s1 procinfo -a 2&gt;&#038;1|sed -e &#039;/^op/!d&#039; -e &#039;/pro/!d&#039; -e &#039;/= -1/d&#039;|sed -e &#039;s%o.*"/proc/\(.*\)".*% \1%g&#039;)); for i in ${PI[*]}; do echo -e "\n&#45;&#45;-===[  /proc/$i  ]\n" &#038;&#038; cat /proc/$i &#038;&#038; echo -e "\n\n"; done; }
&nbsp;
function pss(){
  local U PPS PL PX PXX UUS=( $(command ps uax|awk &#039;{print $1}&#039;|command tail -n +2|sort|uniq) ); UL=$((${#UUS[@]} - 1))
  exec 6&gt;&#038;1; exec &gt; ~/proc.$$
  ps aux | grep ${USER:0:3} | awk &#039;{print $2}&#039; | xargs -t -ipid cat /proc/pid/environ
  for UX in $(seq 0 1 $UUS); do U=${UUS[$UX]}; PPS=( $(pgrep -u ${U}) ); PL=$((${#PPS[@]} - 1));
   for PX in $(seq 0 1 $PL); do PXX=${PPS[$PX]};echo -e "\n\n\n&#45;&#45;&#45;-- PROCESS ID: ${PXX} &#45;&#45;&#45;--\n\n";cat /proc/${PXX}/cmdline 2&gt;$N6 || echo;echo -e "\n\n"; command tree -Csuflapi /proc/Q/${PXX};done
  done
  exec 1&gt;&#038;6 6&gt;&#038;-; cat ~/proc.$$ | more
}
&nbsp;
function ashow_motd()
{ [[ -r /etc/motd ]] &#038;&#038; echo -e "\n\n${CC[2]}`head -n 7 /etc/motd | tail -n 6`${R}\n"; }
&nbsp;
function ashow_calendar()
{ [[ -d /usr/share/calendar/ ]] &#038;&#038; echo -en "\n${CC[5]}" &#038;&#038; ( sed = $(echo /usr/share/calendar/calendar*) | sed -n "/$(date +%m\\/%d\\\|%b\*\ %d)/p" ) &#038;&#038; echo -en "${R}"; }
&nbsp;
function ashow_fortune()
{ [[ -x /usr/games/fortune ]] &#038;&#038; echo -en "\n${CC[6]}" &#038;&#038; /usr/games/fortune -s &#038;&#038; echo -en "${R}"; }
&nbsp;
function askapache()
{
  ascript_title
  ashow_motd
&nbsp;
  have who &#038;&#038; pm "Users" &#038;&#038; pm "Logged In" 3 &#038;&#038;  command who -ar -pld
  pm "Current Limits" 3;command ulimit -a
&nbsp;
  pm "Machine stats";
  have uptime &#038;&#038; pm "uptime" 3 &#038;&#038; command uptime
  [[ -d /proc ]] &#038;&#038; [[ -f /proc/meminfo ]] &#038;&#038; cat /proc/meminfo
  have who &#038;&#038; pm "Users" 3 &#038;&#038; command who
&nbsp;
  pm "Networking"
  have ip &#038;&#038; pm "interfaces" 3 &#038;&#038; ip -o addr|sed -e &#039;s/ \{1,\}/\t/g&#039;
  [[ -r /proc/net/sockstat ]] &#038;&#038; pm "Sockets" 3 &#038;&#038; head -n 2 /proc/net/sockstat
  have ss &#038;&#038; pm "Networking Stats" 3 &#038;&#038; ss -s
  have netstat &#038;&#038; pm "Routing Information" 3 &#038;&#038; netstat -r
&nbsp;
  pm "Disk"
  pm "Mounts" 3; command df -hai
  #[[ -d /sys/block/ ]] &#038;&#038; pm "IO Scheduling" 3; for d in /sys/block/[a-z][a-z][a-z]*/queue/*; do [[ -d $d ]] &#038;&#038; tree $d; echo "$d =&gt; $(cat $d)";done
  have iostat &#038;&#038; pm "I/O on Disks" &#038;&#038; iostat -p ALL
&nbsp;
  pm "Processes";
  pm "process tree" 3;  command ps -HAcl -F S -A f | uniq -w3
  have procinfo &#038;&#038; pm "procinfo" 3 &#038;&#038; procinfo|head -n 13|tail -n 11
}
&nbsp;
asetup_colors
asetup_history
askapache
&nbsp;
</pre>
<p><a href="http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html">Custom bash_profile for Advanced Shell Users</a> originally appeared on AskApache.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/Q1eMSH220bf4Mj45Mr2JfHIj28g/0/da"><img src="http://feedads.g.doubleclick.net/~a/Q1eMSH220bf4Mj45Mr2JfHIj28g/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/Q1eMSH220bf4Mj45Mr2JfHIj28g/1/da"><img src="http://feedads.g.doubleclick.net/~a/Q1eMSH220bf4Mj45Mr2JfHIj28g/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.askapache.com/~ff/apache/htaccess?a=-67b1YGaPtY:VofqY4LVTRU:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=-67b1YGaPtY:VofqY4LVTRU:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=-67b1YGaPtY:VofqY4LVTRU:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=-67b1YGaPtY:VofqY4LVTRU:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=-67b1YGaPtY:VofqY4LVTRU:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		<feedburner:origLink>http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html</feedburner:origLink></item>
		<item>
		<title>An AskApache Plugin Upgrade to Rule them All</title>
		<link>http://feeds.askapache.com/~r/apache/htaccess/~3/QWkF5qKoUvE/an-askapache-plugin-upgrade-to-rule-them-all.html</link>
		<comments>http://www.askapache.com/wordpress/an-askapache-plugin-upgrade-to-rule-them-all.html#comments</comments>
		<pubDate>Wed, 29 Jul 2009 17:59:07 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Apache Modules]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Web Tools]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[AskApache Google 404]]></category>
		<category><![CDATA[AskApache Password Protection]]></category>
		<category><![CDATA[Fsockopen]]></category>
		<category><![CDATA[wordpress security]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=3062</guid>
		<description><![CDATA[<p><a class="IFL" href="/wp-content/uploads/2009/07/apache-server-status.png"><img src="/wp-content/uploads/2009/07/apache-server-status-350x164.png" alt="apache-server-status" title="apache-server-status" width="350" height="164" class="alignnone size-medium wp-image-3070" /></a>So my blog as been rather quiet for almost a year now, and very few updates if any have been released for my Password Protection PLugin, my Google 404 Plugin, and definately not for my AskApache CrazyCache plugin, which I will be releasing last...  So for all of you who've helped me out by sending me suggestions and notifying me of errors and sticking with it...  Just wanted to <strong>say sorry about that, and thanks for all the great ideas.. </strong> Well, I've been sticking with it as well believe it our not.  I manage to get free days once in a while, and then its <strong>time to jam</strong>.<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href="/wp-content/uploads/2009/07/apache-server-status.png"><img src="/wp-content/uploads/2009/07/apache-server-status-350x164.png" alt="apache-server-status" title="apache-server-status" width="350" height="164" class="alignnone size-medium wp-image-3070" /></a>So my blog as been rather quiet for almost a year now, and very few updates if any have been released for my Password Protection PLugin, my Google 404 Plugin, and definately not for my AskApache CrazyCache plugin, which I will be releasing last&#8230;  So for all of you who&#8217;ve helped me out by sending me suggestions and notifying me of errors and sticking with it&#8230;  Just wanted to <strong>say sorry about that, and thanks for all the great ideas.. </strong> Well, I&#8217;ve been sticking with it as well believe it our not.  I manage to get free days once in a while, and then its <strong>time to jam</strong>.</p>
<p>I&#8217;ve used just about every CMS/Blog/Forum/Trac/Gallery/etc) and really didn&#8217;t like a lot of the way they coded&#8230;  I could use php but I didn&#8217;t KNOW php.. so I&#8217;ve had to learn php also, and it was tough to learn the advanced class usage and all the other language specific (but similar) constructs for php.  It was especially difficult (but fun and challenging) to program so as to be compatible with php4 and php5 (Such is WordPress).    But I kept at it, and soon you can decide for yourself what to make of it.</p>
<p>I can code in plenty of languages (bash, lua, windows .bat and vbs,  ocaml, big fan of all things shell) and can work my way through C and even sorta somewhat with assembly.  Assembly is the hardest, by far,  I&#8217;m into easy and powerful languages like Python, Javascript, perl, php, ruby, and CGI. I&#8217;ve used PHP for a long time to do various things,  but never to build software projects like this.  Once I noticed WordPress&#8217;s core .php files and the excellent programming I wanted to try and learn hot to do it.   The WordPress code is some of the best I&#8217;ve seen.  It appears the way they built it was planned, and not just dreamt up while typing that I can&#8217;t help but do.    Every time I read through the core code I learn a new trick or very nice way to do something.  Those guys are really good, and I think WordPress is going to dominate for a long long time.</p>
<h2>The Strategy</h2>
<p>The Password Protection (passpro) plugin has a lot of complex stuff going on, especially for a newbie to PHP and WordPress like me, so after refactoring the whole thing at least 5 times I decided to modify my approach, and wrote the AskApache Google 404 Plugin as a way to practice on a simpler piece of code, while at the same time providing a plugin of value.   Eventually I stopped thinking I could just code the whole thing in one sit-down with a stream-of-consciousness, and had to instead modularize the code and focus in on each part before moving to the next (I go without a plan because its fun, just not the most productive, but again, I&#8217;m not a programmer in the scientific sense.).</p>
<p>So I decided I had to really learn how WordPress Plugins work, filters, hooks, actions, and basically comfortability at reverse-engineering code, (Im a beginner for the last time), and so with the upcoming release of the AskApache Google 404 Plugin I have succeeded in making an incredibly stable plugin.  That way I only have to worry about what the aapasspro plugin is doing, instead of trying to fit it into a framework.  </p>
<h2>AskApache Google 404 Upgrade</h2>
<p>I think its rather unusual to develop a nice plugin like this 404 handler merely for the purpose of improving upon another plugin, but hey it worked.  As of <em>08/03/2009 14:06PM EST</em> I have about 1 hour left of finishing touches to release this upgrade.  But as you cantell by my badly edited posts, I don&#8217;t have a lot of time to myself.  An hour here and there is about it.  So it could be up to 2 weeks before I actually have the time to commit the release to the repo.  On a sidenote, have you checked out <a href="http://windows7news.com/" title="Windows 7 News">Windows 7 News</a>?  I&#8217;ve been contracted to do some technical work for them and thought they had an excellent site.</p>
<p><a href="/wp-content/uploads/2009/07/askapache-google-upgrade-ss1.png"><img src="/wp-content/uploads/2009/07/askapache-google-upgrade-ss1-344x350.png" alt="askapache-google-upgrade-ss1" title="askapache-google-upgrade-ss1" width="344" height="350" class="alignnone size-medium wp-image-3139" /></a></p>
<p><a href="/wp-content/uploads/2009/07/askapache-google-upgrade-ss2.png"><img src="/wp-content/uploads/2009/07/askapache-google-upgrade-ss2-293x350.png" alt="askapache-google-upgrade-ss2" title="askapache-google-upgrade-ss2" width="293" height="350" class="alignnone size-medium wp-image-3138" /></a></p>
<p>But keep in mind, the 404 PLugin is just where I practice for the passpro plugin, which truly does have features that no other software like it has ever had.  I understand the technology behind this plugin, and know it would really have a great impact on improving the Web (esp. WordPress) for all of us, I&#8217;ve just had to learn how to make it.</p>
<h2>AskApache Password Protection</h2>
<p>Probably still a couple weeks away, this plugin is the ultimate culmination of apache hackers dreams, at least those on shared servers (who may be interested in learning how to bypass security of said servers)..  So this is something I have much too fun with doing what I like to do.. network/protocol-level security.  I&#8217;ve examined the source code for many software packages that I use or have used to audit a server&#8217;s security, and this simple php plugin in most instances can enumerate with accuraccy most of the server&#8217;s setup in about a minute.  The catch (and the file permission problems I had to find a workaround too) is that this software is launched on the server, not remotely against the server.</p>
<p>Some of the software I examined was whiskers, nessus, nmap, hping, mozilla source, wireshark, ncftp, netcat, etc..  The closest comparison to the socket-level class I&#8217;ve hacked together to those is wireshark.  Except that wireshark only interprets (captures) the data passing over the wire, while this class does that and in fact sends and receives the data like netcat or nmap.  Its really more similar to metasploit, and can easily be used to send hex, binary, ascii, or any type of payload to the remote or local host.</p>
<h2>The Upgrades Begin</h2>
<p>Well I started working on them a long time ago.  Both the Password Protection plugin and the Google 404 plugin needed serious work.   And I finally have it all figured out.  Essentially I would work on one and finish an upgrade, but I just wasn&#8217;t happy with it and I wold start all over again, refactoring the code.   So as I put the finishing touches on those 2 plugins keep an eye out.  They are major upgrades.   I was able to meet all the goals I had for them, and came up with a lot of more improvements during the process.One of the main things I needed was a socket-level class to perform all kinds of checks and tests on.  I need this also for my crazy cache plugin, which my blog is currently using ,  and I have a 2 more really nice pplugins I use that also needed  access to a network class.  I wrote about what I was doing with fsockopen, and I&#8217;ve been improving on that example ever since.  I use this class to do some really powerful and exciting stuff, but you&#8217;ll see it soon enough.  As an indication of &#8216;getting it right&#8217; for the Password Protection plugin, the plugin will now work on Windows, Apache, IIS, Lighthttpd, and will even work running on a blackberry web server.  So now everyone using wordpress can at least get some security()</p>
<p class="enote">Many of the the other improvements focus on using the fsockopen class and .htaccess tricks to basically enumerate and discover all the different capabilities of your particular server;  That way you can learn about all the features and security that are possible for your specific server, and the securty modules wi8ll be geared for that as well.  FINALLY this plugin is going to be stable, and I just cant wait to see how people react when they learn all great capability their Apache-based Server has that they didn&#8217;t have a clue about.   Its amazing in that sense, and hackers will love theh way it works.. but your server admins will love it even more because its entirely 100% focused on helping you to set your site up (if you have Apache) to keep spammers out, to keep virii-serving robots and their log-hogging exploit requests and CPU/Mem robiing 404 errors off of your servers for real.  This will have a noticeable affect to whoever is running the server.   As you can tell.. I am pumped!</br></p>
<hr class="C" />
Apache is easy to configure and use, but only when you have root access.  Most people on shared and private hosting aren&#8217;t even able to view the main config file, let alone execute the Apache binaries to see what features are available and what configuration is being used.<br class="C" /></p>
<p>Apache can only be influenced by the main server configs and by .htaccess files.  Not by php, not by perl, and the main configs are almost never accessible to the masses.  But .htaccess files are.  And many hosting providers allow and enable .htaccess files, a configuration file for your web server.  The advanced features and capabilities of Apache were out of reach for most of us, it just wasn&#8217;t possible to enumerate or access, and most hosting providers are infamous for their lack of .htaccess (customer) support.  This plugin goes around those problems to give the power back to the people.<br class="C" /></p>
<p>y creating custom .htaccess files containing unpublished .htaccess tricks and techniques and combining that with the use of socket-level networking from WordPress (PHP) using <a href="http://www.askapache.com/php/fsockopen-socket.html">fsockopen</a>, we can effectively enumerate and discover an incredible amount of features and settings you will be able to control and use with this plugin.</p>
<p>Here are a few examples of the capabilities of this plugin, some of which I believe no other software can do..  <em>(Open source free to copy!)</em>.</p>
<ol>
<li>Current Version of Apache (<strong>Down to the API Version</strong>)</li>
<li>List of <strong>ALL Modules currently enabled</strong> by Apache (Such as Mod_Rewrite)</li>
<li>List of <strong>ALL Directives enabled by EACH enabled Module.</strong></li>
<li>Enumerate .htaccess Overrides, Context Permissions</li>
<li>Test for any builtin Handlers (like the <a href="/wp-content/uploads/2009/07/apache-server-status.png">status handler screenshot</a>)</li>
<li>Configure SSI (<a href="http://www.askapache.com/htaccess/advanced-htaccess-ssi.html#htaccess-ssi-security">http://www.askapache.com/htaccess/advanced-htaccess-ssi.html#htaccess-ssi-security</a>)</li>
</ol>
<blockquote cite="http://www.askapache.com/htaccess/password-protection-plugin-status.html"><div class="inote"><cite><a href="http://www.askapache.com/htaccess/password-protection-plugin-status.html"></a></cite>
<p><strong>March 1, 2009</strong><br /><strong>I would focus on the method that WordPress uses</strong>.  The code they have now (2.8 bleeding-edge) still isn&#8217;t where it needs to be, but this is some difficult stuff and <strong>they have a brilliant start, it&#8217;ll work.. just a question of when</strong>.</p>
<p><a class="IFL" href="/wp-content/uploads/2009/03/apache-security-model-tall1.png"><img src="/wp-content/uploads/2009/03/apache-security-model-tall1-250x123.png" alt="Apache Security Model - In Color" title="apache-security-model-wide" width="250" height="123" /></a><strong>The main issue</strong> with the password protection plugin working for some people and not others is due to <a title="detailed file permission article" href="http://www.askapache.com/security/chmod-stat.html">file permission configurations</a>.  The plugin attempts to write/modify files in your blog&#8217;s root directory.<br class="C" /></p>
</div>
</blockquote>
<hr class="C" />
<blockquote cite="http://www.askapache.com/htaccess/htaccess-plugin-blocks-spam-hackers-and-password-protects-blog.html"><div class="inote"><cite><a href="http://www.askapache.com/htaccess/htaccess-plugin-blocks-spam-hackers-and-password-protects-blog.html"></a></cite>
<p><strong>November 05, 2008</strong><br />To make a long story short, I downloaded each major release of the apache httpd source code starting at version 1.3.0 and finishing with version 2.2.11, I then compiled each version and built a HTTPD from source for all these apache versions.</p>
<div>
<div style="width:100px;overflow:hidden;float:left;">
<ul>
<li>1.3.0</li>
<li>1.3.1</li>
<li>1.3.11</li>
<li>1.3.12</li>
<li>1.3.14</li>
<li>1.3.17</li>
<li>1.3.19</li>
<li>1.3.2</li>
<li>1.3.20</li>
<li>1.3.22</li>
<li>1.3.23</li>
<li>1.3.24</li>
<li>1.3.27</li>
<li>1.3.28</li>
</ul>
</div>
<div style="width:100px;overflow:hidden;float:left;">
<ul>
<li>1.3.29</li>
<li>1.3.3</li>
<li>1.3.31</li>
<li>1.3.32</li>
<li>1.3.33</li>
<li>1.3.34</li>
<li>1.3.35</li>
<li>1.3.36</li>
<li>1.3.37</li>
<li>1.3.39</li>
<li>1.3.4</li>
<li>1.3.41</li>
<li>1.3.6</li>
<li>1.3.9</li>
</ul>
</div>
<div style="width:100px;overflow:hidden;float:left;">
<ul>
<li>2.0.35</li>
<li>2.0.36</li>
<li>2.0.39</li>
<li>2.0.40</li>
<li>2.0.42</li>
<li>2.0.43</li>
<li>2.0.44</li>
<li>2.0.45</li>
<li>2.0.46</li>
<li>2.0.47</li>
<li>2.0.48</li>
<li>2.0.49</li>
<li>2.0.50</li>
<li>2.0.51</li>
</ul>
</div>
<div style="width:150px;overflow:hidden;float:left;">
<ul>
<li>2.0.52</li>
<li>2.0.53</li>
<li>2.0.54</li>
<li>2.0.55</li>
<li>2.0.58</li>
<li>2.0.59</li>
<li>2.0.61</li>
<li>2.0.63</li>
<li>2.1.3-beta</li>
<li>2.1.6-alpha</li>
<li>2.1.7-beta</li>
<li>2.1.8-beta</li>
<li>2.1.9-beta</li>
</ul>
</div>
<div style="width:100px;overflow:hidden;float:left;">
<ul>
<li>2.2.0</li>
<li>2.2.10</li>
<li>2.2.2</li>
<li>2.2.3</li>
<li>2.2.4</li>
<li>2.2.6</li>
<li>2.2.8</li>
<li>2.2.9</li>
<li><strong>2.2.10</strong></li>
<li><strong>2.2.11</strong></li>
</ul>
</div>
<p><br class="C" /></div>
<p>Then I went through each version and determined the compatible modules for that version, and I&#8217;m pretty confident that I was also able to find each and every directive allowed by the compatible modules for that version (including core directives).  See <a href="http://www.askapache.com/htaccess/htaccess.html#htaccess-directives">.htaccess directive list</a>.  Basically I can now test a server using a variety of methods and determine almost 100% accurately what version of Apache (down to the API) is running, what modules (and versions) are enabled, and each and every directive that is allowed or disallowed for that version.  So this is so awesome because now we can enable all sorts of additional security features.</p>
</div>
</blockquote>
<hr class="C" />
<blockquote cite="http://www.askapache.com/htaccess/htaccess.html#htaccess-modules"><p><cite><a href="http://www.askapache.com/htaccess/htaccess.html#htaccess-modules">Htaccess enabled Modules</a></cite>
<p>Here are most of the modules that come with Apache.  Each one can have new commands that can be used in .htaccess file scopes.</p>
<p><a href="http://www.askapache.com/servers/mod_actions.c.html">mod_actions</a>, <a href="http://www.askapache.com/servers/mod_alias.c.html">mod_alias</a>, <a href="http://www.askapache.com/servers/mod_asis.c.html">mod_asis</a>, <a href="http://www.askapache.com/servers/mod_auth_basic.c.html">mod_auth_basic</a>, <a href="http://www.askapache.com/servers/mod_auth_digest.c.html">mod_auth_digest</a>, <a href="http://www.askapache.com/servers/mod_authn_anon.c.html">mod_authn_anon</a>, <a href="http://www.askapache.com/servers/mod_authn_dbd.c.html">mod_authn_dbd</a>, <a href="http://www.askapache.com/servers/mod_authn_dbm.c.html">mod_authn_dbm</a>, <a href="http://www.askapache.com/servers/mod_authn_default.c.html">mod_authn_default</a>, <a href="http://www.askapache.com/servers/mod_authn_file.c.html">mod_authn_file</a>, <a href="http://www.askapache.com/servers/mod_authz_dbm.c.html">mod_authz_dbm</a>, <a href="http://www.askapache.com/servers/mod_authz_default.c.html">mod_authz_default</a>, <a href="http://www.askapache.com/servers/mod_authz_groupfile.c.html">mod_authz_groupfile</a>, <a href="http://www.askapache.com/servers/mod_authz_host.c.html">mod_authz_host</a>, <a href="http://www.askapache.com/servers/mod_authz_owner.c.html">mod_authz_owner</a>, <a href="http://www.askapache.com/servers/mod_authz_user.c.html">mod_authz_user</a>, <a href="http://www.askapache.com/servers/mod_autoindex.c.html">mod_autoindex</a>, <a href="http://www.askapache.com/servers/mod_cache.c.html">mod_cache</a>, <a href="http://www.askapache.com/servers/mod_cern_meta.c.html">mod_cern_meta</a>, <a href="http://www.askapache.com/servers/mod_cgi.c.html">mod_cgi</a>, <a href="http://www.askapache.com/servers/mod_dav.c.html">mod_dav</a>, <a href="http://www.askapache.com/servers/mod_dav_fs.c.html">mod_dav_fs</a>, <a href="http://www.askapache.com/servers/mod_dbd.c.html">mod_dbd</a>, <a href="http://www.askapache.com/servers/mod_deflate.c.html">mod_deflate</a>, <a href="http://www.askapache.com/servers/mod_dir.c.html">mod_dir</a>, <a href="http://www.askapache.com/servers/mod_disk_cache.c.html">mod_disk_cache</a>, <a href="http://www.askapache.com/servers/mod_dumpio.c.html">mod_dumpio</a>, <a href="http://www.askapache.com/servers/mod_env.c.html">mod_env</a>, <a href="http://www.askapache.com/servers/mod_expires.c.html">mod_expires</a>, <a href="http://www.askapache.com/servers/mod_ext_filter.c.html">mod_ext_filter</a>, <a href="http://www.askapache.com/servers/mod_file_cache.c.html">mod_file_cache</a>, <a href="http://www.askapache.com/servers/mod_filter.c.html">mod_filter</a>, <a href="http://www.askapache.com/servers/mod_headers.c.html">mod_headers</a>, <a href="http://www.askapache.com/servers/mod_ident.c.html">mod_ident</a>, <a href="http://www.askapache.com/servers/mod_imagemap.c.html">mod_imagemap</a>, <a href="http://www.askapache.com/servers/mod_include.c.html">mod_include</a>, <a href="http://www.askapache.com/servers/mod_info.c.html">mod_info</a>, <a href="http://www.askapache.com/servers/mod_log_config.c.html">mod_log_config</a>, <a href="http://www.askapache.com/servers/mod_log_forensic.c.html">mod_log_forensic</a>, <a href="http://www.askapache.com/servers/mod_logio.c.html">mod_logio</a>, <a href="http://www.askapache.com/servers/mod_mem_cache.c.html">mod_mem_cache</a>, <a href="http://www.askapache.com/servers/mod_mime.c.html">mod_mime</a>, <a href="http://www.askapache.com/servers/mod_mime_magic.c.html">mod_mime_magic</a>, <a href="http://www.askapache.com/servers/mod_negotiation.c.html">mod_negotiation</a>, <a href="http://www.askapache.com/servers/mod_proxy.c.html">mod_proxy</a>, <a href="http://www.askapache.com/servers/mod_proxy_ajp.c.html">mod_proxy_ajp</a>, <a href="http://www.askapache.com/servers/mod_proxy_balancer.c.html">mod_proxy_balancer</a>, <a href="http://www.askapache.com/servers/mod_proxy_connect.c.html">mod_proxy_connect</a>, <a href="http://www.askapache.com/servers/mod_proxy_ftp.c.html">mod_proxy_ftp</a>, <a href="http://www.askapache.com/servers/mod_proxy_http.c.html">mod_proxy_http</a>, <a href="http://www.askapache.com/servers/mod_rewrite.c.html">mod_rewrite</a>, <a href="http://www.askapache.com/servers/mod_setenvif.c.html">mod_setenvif</a>, <a href="http://www.askapache.com/servers/mod_speling.c.html">mod_speling</a>, <a href="http://www.askapache.com/servers/mod_ssl.c.html">mod_ssl</a>, <a href="http://www.askapache.com/servers/mod_status.c.html">mod_status</a>, <a href="http://www.askapache.com/servers/mod_substitute.c.html">mod_substitute</a>, <a href="http://www.askapache.com/servers/mod_unique_id.c.html">mod_unique_id</a>, <a href="http://www.askapache.com/servers/mod_userdir.c.html">mod_userdir</a>, <a href="http://www.askapache.com/servers/mod_usertrack.c.html">mod_usertrack</a>, <a href="http://www.askapache.com/servers/mod_version.c.html">mod_version</a>, <a href="http://www.askapache.com/servers/mod_vhost_alias.c.html">mod_vhost_alias</a></p>
</blockquote>
<hr class="C" />
<hr class="C" />
<h2>Debugging HTTP protocol</h2>
<p>Check this out!  I&#8217;m particularly happy about this feature, which outputs an exact trace of any requests made by the plugin (such as during the testing phase) by saving the actual raw data sent out on the wire using fsockopen, RX and TX.  This is useful for a number of reasons, viewing your headers, finding Redirect Loops, testing RewriteRules, and following the request hop-by-hop for debugging.  The below example shows 2 requests for 2 URIs.  The first URI is protected using Digest Authentication, the 2nd shows Basic.</p>
<pre>
 ______________
|  RAW TRACE   |
==================================================================================================================================
GET /htaccess/index.txt?testing=query HTTP/1.1
Host: www.askapache.com
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1) AA_PassPro/1.9 (http://www.askapache.com/)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: close
Referer: http://www.askapache.com/
&nbsp;
HTTP/1.1 401 Authorization Required
Date: Wed, 22 Jul 2009 06:29:58 GMT
Server: Apache
WWW-Authenticate: Digest realm="do or die", nonce="03328f3ec7c7b", algorithm=MD5, domain="/", qop="auth"
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 882
Connection: close
Content-Type: text/html; charset=UTF-8
&nbsp;
GET /htaccess/index.txt?testing=query HTTP/1.1
Host: www.askapache.com
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1) AA_PassPro/1.9 (http://www.askapache.com/)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: close
Referer: http://www.askapache.com/
Authorization: Digest username="test",realm="do or die",nonce="03328f3ec7c7b",uri="/htaccess/index.txt?testing=query",
cnonce="82d057852a9dc497",nc=00000001,algorithm=MD5,response="9d476e9ea3",qop="auth"
&nbsp;
HTTP/1.1 200 OK
Date: Wed, 22 Jul 2009 06:29:58 GMT
Server: Apache
Authentication-Info: rspauth="9051b01ee26dd62b3e2b40dada694f45", cnonce="82d057852a9dc497", nc=00000001, qop=auth
Last-Modified: Tue, 21 Jul 2009 23:56:00 GMT
Accept-Ranges: bytes
Cache-Control: max-age=3600
Expires: Wed, 22 Jul 2009 07:29:58 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 27
Connection: close
Content-Type: text/plain; charset=UTF-8
&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;``
&nbsp;
 ______________
|  RAW TRACE   |
==================================================================================================================================
GET /htaccess/po.txt?testing=query HTTP/1.1
Host: www.askapache.com
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1) AA_PassPro/1.9 (http://www.askapache.com/)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: close
Referer: http://www.askapache.com/
&nbsp;
HTTP/1.1 401 Authorization Required
Date: Wed, 22 Jul 2009 06:29:58 GMT
Server: Apache
WWW-Authenticate: Basic realm="Po Pimping"
Accept-Ranges: bytes
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 878
Connection: close
Content-Type: text/html; charset=UTF-8
&nbsp;
GET /htaccess/po.txt?testing=query HTTP/1.1
Host: www.askapache.com
User-Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1) AA_PassPro/1.9 (http://www.askapache.com/)
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: close
Referer: http://www.askapache.com/
Authorization: Basic adfAGAltcA==
&nbsp;
HTTP/1.1 200 OK
Date: Wed, 22 Jul 2009 06:29:58 GMT
Server: Apache
Last-Modified: Wed, 22 Jul 2009 05:54:39 GMT
Accept-Ranges: bytes
Cache-Control: max-age=3600
Expires: Wed, 22 Jul 2009 07:29:58 GMT
Vary: Accept-Encoding
Content-Encoding: gzip
Content-Length: 27
Connection: close
Content-Type: text/plain; charset=UTF-8
&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;`&#96;``
</pre>
<h2>.htaccess Directives</h2>
<p>AcceptFilter, AcceptMutex, AcceptPathInfo, AccessFileName, Action, AddAlt, AddAltByEncoding, AddAltByType, AddCharset, AddDefaultCharset, AddDescription, AddEncoding, AddHandler, AddIcon, AddIconByEncoding, AddIconByType, AddInputFilter, AddLanguage, AddModuleInfo, AddOutputFilter, AddOutputFilterByType, AddType, Alias, AliasMatch, AllowCONNECT, AllowEncodedSlashes, AllowOverride, Anonymous, Anonymous_Authoritative, Anonymous_LogEmail, Anonymous_MustGiveEmail, Anonymous_NoUserID, Anonymous_NoUserId, Anonymous_VerifyEmail, AssignUserId, AuthAuthoritative, AuthBasicAuthoritative, AuthBasicProvider, AuthDBDUserPWQuery, AuthDBDUserRealmQuery, AuthDBM, AuthDBMAuthoritative, AuthDBMGroupFile, AuthDBMType, AuthDBMUserFile, AuthDefaultAuthoritative, AuthDigestAlgorithm, AuthDigestDomain, AuthDigestFile, AuthDigestGroupFile, AuthDigestNcCheck, AuthDigestNonceFormat, AuthDigestNonceLifetime, AuthDigestProvider, AuthDigestQop, AuthDigestShmemSize, AuthGroupFile, AuthLDAPAuthzEnabled, AuthLDAPBindDN, AuthLDAPBindON, AuthLDAPBindPassword, AuthLDAPCharsetConfig, AuthLDAPCompareDNOnServer, AuthLDAPDereferenceAliases, AuthLDAPEnabled, AuthLDAPFrontPageHack, AuthLDAPGroupAttribute, AuthLDAPGroupAttributeIsDN, AuthLDAPRemoteUserAttribute, AuthLDAPRemoteUserIsDN, AuthLDAPStartTLS, AuthLDAPURL, AuthLDAPUrl, AuthName, AuthType, AuthUserFile, AuthzDBMAuthoritative, AuthzDBMType, AuthzDefaultAuthoritative, AuthzGroupFileAuthoritative, AuthzLDAPAuthoritative, AuthzOwnerAuthoritative, AuthzUserAuthoritative, BS2000Account, BalancerMember, BrowserMatch, BrowserMatchNoCase, BufferedLogs, CGIMapExtension, CacheDefaultExpire, CacheDirLength, CacheDirLevels, CacheDisable, CacheEnable, CacheExpiryCheck, CacheFile, CacheForceCompletion, CacheGcClean, CacheGcDaily, CacheGcInterval, CacheGcMemUsage, CacheGcUnused, CacheIgnoreCacheControl, CacheIgnoreHeaders, CacheIgnoreNoLastMod, CacheLastModifiedFactor, CacheMaxExpire, CacheMaxFileSize, CacheMaxStreamingBuffer, CacheMinFileSize, CacheNegotiatedDocs, CacheRoot, CacheSize, CacheStoreNoStore, CacheStorePrivate, CacheTimeMargin, CharsetDefault, CharsetOptions, CharsetSourceEnc, CheckCaseOnly, CheckSpelling, ChildPerUserId, ContentDigest, CookieDomain, CookieExpires, CookieLog, CookieName, CookieStyle, CookieTracking, CoreDumpDirectory, CustomLog, DAV, DAVDepthInfinity, DAVGenericLockDB, DAVMinTimeout, DBDExptime, DBDKeep, DBDMax, DBDMin, DBDParams, DBDPersist, DBDPrepareSQL, DBDriver, Dav, DavDepthInfinity, DavGenericLockDB, DavLockDB, DavMinTimeout, DefaultIcon, DefaultLanguage, DefaultType, DeflateBufferSize, DeflateCompressionLevel, DeflateFilterNote, DeflateMemLevel, DeflateWindowSize, Directory, DirectoryIndex, DirectoryMatch, DirectorySlash, DocumentRoot, DumpIOInput, DumpIOOutput, EnableExceptionHook, EnableMMAP, EnableSendfile, ErrorDocument, ErrorLog, Example, ExpiresActive, ExpiresByType, ExpiresDefault, ExtFilterDefine, ExtFilterOptions, ExtendedStatus, FancyIndexing, FileETag, Files, FilesMatch, FilterChain, FilterDeclare, FilterProtocol, FilterProvider, FilterTrace, ForceLanguagePriority, ForceType, ForensicLog, GprofDir, GracefulShutdownTimeout, Group, Header, HeaderName, HostNameLookups, HostnameLookups, ISAIPFakeAsync, ISAPIAppendLogToErrors, ISAPIAppendLogToQuery, ISAPICacheFile, ISAPIFakeAsync, ISAPILogNotSupported, ISAPIReadAheadBuffer, IdentityCheck, IdentityCheckTimeout, IfDefine, IfModule, IfVersion, ImapBase, ImapDefault, ImapMenu, Include, IndexIgnore, IndexOptions, IndexOrderDefault, IndexStyleSheet, KeepAlive, KeepAliveTimeout, LDAPCacheEntries, LDAPCacheTTL, LDAPCertDBPath, LDAPConnectionTimeout, LDAPOpCacheEntries, LDAPOpCacheTTL, LDAPSharedCacheFile, LDAPSharedCacheSize, LDAPTrustedClientCert, LDAPTrustedGlobalCert, LDAPTrustedMode, LDAPVerifyServerCert, LanguagePriority, Limit, LimitExcept, LimitInternalRecursion, LimitRequestBody, LimitRequestFields, LimitRequestFieldsize, LimitRequestLine, LimitXMLRequestBody, Listen, ListenBacklog, LoadFile, LoadModule, Location, LocationMatch, LockFile, LogFormat, LogLevel, MCacheMaxObjectCount, MCacheMaxObjectSize, MCacheMaxStreamingBuffer, MCacheMinObjectSize, MCacheRemovalAlgorithm, MCacheSize, MMapFile, MaxClients, MaxKeepAliveRequests, MaxMemFree, MaxRequestsPerChild, MaxSpareServers, MaxSpareThreads, MaxSpareThreadsPerChild, MaxThreads, MetaDir, MetaFiles, MetaSuffix, MimeMagicFile, MinSpareServers, MinSpareThreads, ModMimeUsePathInfo, MultiviewsMatch, NWSSLTrustedCerts, NWSSLUpgradeable, NameVirtualHost, NoProxy, NumServers, Options, PassEnv, PerlAccessHandler, PerlAuthenHandler, PerlAuthzHandler, PerlChildExitHandler, PerlChildInitHandler, PerlCleanupHandler, PerlDispatchHandler, PerlFixupHandler, PerlFreshRestart, PerlHandler, PerlHeaderParserHandler, PerlInitHandler, PerlLogHandler, PerlModule, PerlPassEnv, PerlPostReadRequestHandler, PerlRequire, PerlRestartHandler, PerlSendHeader, PerlSetEnv, PerlSetVar, PerlSetupEnv, PerlTaintCheck, PerlTransHandler, PerlTypeHandler, PerlWarn, PidFile, Port, Protocol, ProtocolEcho, Proxy, ProxyBadHeader, ProxyBlock, ProxyDomain, ProxyErrorOverride, ProxyFtpDirCharset, ProxyIOBufferSize, ProxyMatch, ProxyMaxForwards, ProxyPass, ProxyPassInterpolateEnv, ProxyPassMatch, ProxyPassReverse, ProxyPassReverseCookieDomain, ProxyPassReverseCookiePath, ProxyPreserveHost, ProxyReceiveBufferSize, ProxyRemote, ProxyRemoteMatch, ProxyRequests, ProxySet, ProxyStatus, ProxyTimeout, ProxyVia, RLimitCPU, RLimitMEM, RLimitNPROC, ReadmeName, Redirect, RedirectMatch, RedirectPermanent, RedirectTemp, RemoveCharset, RemoveEncoding, RemoveHandler, RemoveInputFilter, RemoveLanguage, RemoveOutputFilter, RemoveType, RequestHeader, Require, RewriteBase, RewriteCond, RewriteEngine, RewriteLock, RewriteLog, RewriteLogLevel, RewriteMap, RewriteOptions, RewriteRule, SSIAccessEnable, SSIEndTag, SSIErrorMsg, SSIStartTag, SSITimeFormat, SSIUndefinedEcho, SSLCACertificateFile, SSLCACertificatePath, SSLCADNRequestFile, SSLCADNRequestPath, SSLCARevocationFile, SSLCARevocationPath, SSLCertificateChainFile, SSLCertificateFile, SSLCertificateKeyFile, SSLCipherSuite, SSLCryptoDevice, SSLEngine, SSLHonorCipherOrder, SSLLog, SSLLogLevel, SSLMutex, SSLOptions, SSLPassPhraseDialog, SSLProtocol, SSLProxyCACertificateFile, SSLProxyCACertificatePath, SSLProxyCARevocationFile, SSLProxyCARevocationPath, SSLProxyCipherSuite, SSLProxyEngine, SSLProxyMachineCertificateFile, SSLProxyMachineCertificatePath, SSLProxyProtocol, SSLProxyVerify, SSLProxyVerifyDepth, SSLRandomSeed, SSLRequire, SSLRequireSSL, SSLSessionCache, SSLSessionCacheTimeout, SSLUserName, SSLVerifyClient, SSLVerifyDepth, Satisfy, ScoreBoardFile, Script, ScriptAlias, ScriptAliasMatch, ScriptInterpreterSource, ScriptLog, ScriptLogBuffer, ScriptLogLength, ScriptStock, SecureListen, SendBufferSize, ServerAdmin, ServerAlias, ServerLimit, ServerName, ServerPath, ServerRoot, ServerSignature, ServerTokens, SetEnv, SetEnvIf, SetEnvIfNoCase, SetHandler, SetInputFilter, SetOutputFilter, StartServers, StartThreads, Substitute, SuexecUserGroup, ThreadLimit, ThreadStackSize, ThreadsPerChild, TimeOut, Timeout, TraceEnable, TransferLog, TypeAuthDBMUserFile, TypesConfig, UnsetEnv, UseCanonicalName, UseCanonicalPhysicalPort, User, UserDir, VirtualDocumentRoot, VirtualDocumentRootIP, VirtualHost, VirtualScriptAlias, VirtualScriptAliasIP, Win32DisableAcceptEx, XBitHack, allow, deny, order, php_admin_flag, php_admin_value, php_flag, php_value</p>
<p class="anote">You can view the <a href="http://www.askapache.com/htaccess/htaccess-security-block-spam-hackers.html">plugins home page</a>, <a href="http://www.askapache.com/wordpress/htaccess-password-protect.html#aadl">old</a>, or <a href="http://wordpress.org/extend/plugins/askapache-password-protect/">view it on the wordpress.org site</a>.</p>
<p><a href="http://www.askapache.com/wordpress/an-askapache-plugin-upgrade-to-rule-them-all.html">An AskApache Plugin Upgrade to Rule them All</a> originally appeared on AskApache.</p>
<p><a href="http://feedads.g.doubleclick.net/~a/HfAm6FusxxlCcQHnfgvPZA9CPcw/0/da"><img src="http://feedads.g.doubleclick.net/~a/HfAm6FusxxlCcQHnfgvPZA9CPcw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/HfAm6FusxxlCcQHnfgvPZA9CPcw/1/da"><img src="http://feedads.g.doubleclick.net/~a/HfAm6FusxxlCcQHnfgvPZA9CPcw/1/di" border="0" ismap="true"></img></a></p><div class="feedflare">
<a href="http://feeds.askapache.com/~ff/apache/htaccess?a=QWkF5qKoUvE:zkP1DfqSJL8:V_sGLiPBpWU"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=QWkF5qKoUvE:zkP1DfqSJL8:V_sGLiPBpWU" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=QWkF5qKoUvE:zkP1DfqSJL8:F7zBnMyn0Lo"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?i=QWkF5qKoUvE:zkP1DfqSJL8:F7zBnMyn0Lo" border="0"></img></a> <a href="http://feeds.askapache.com/~ff/apache/htaccess?a=QWkF5qKoUvE:zkP1DfqSJL8:dnMXMwOfBR0"><img src="http://feeds.feedburner.com/~ff/apache/htaccess?d=dnMXMwOfBR0" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/wordpress/an-askapache-plugin-upgrade-to-rule-them-all.html/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		<feedburner:origLink>http://www.askapache.com/wordpress/an-askapache-plugin-upgrade-to-rule-them-all.html</feedburner:origLink></item>
	</channel>
</rss>
