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

<channel>
	<title>AskApache &#187; Search Results  &#187;  SEO</title>
	<atom:link href="http://www.askapache.com/search/SEO/feed/rss2/" rel="self" type="application/rss+xml" />
	<link>http://www.askapache.com</link>
	<description>Advanced Web Development</description>
	<lastBuildDate>Sun, 29 Jan 2012 12:04:08 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Htaccess Rewrites for Moving Urls</title>
		<link>http://www.askapache.com/htaccess/htaccess-rewrites.html</link>
		<comments>http://www.askapache.com/htaccess/htaccess-rewrites.html#comments</comments>
		<pubDate>Sat, 29 Oct 2011 14:41:55 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Htaccess]]></category>
		<category><![CDATA[301 Redirects]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=5231</guid>
		<description><![CDATA[<p><a href="http://www.askapache.com/htaccess/htaccess-rewrites.html"></a><a href="http://www.askapache.com/htaccess/htaccess-rewrites.html"><cite>AskApache.com</cite></a></p><p>This is part 2 of the <a href="http://www.askapache.com/htaccess/htaccess.html" title="Htaccess Tutorial like no other">exhaustive Htaccess Tutorial</a>.  I realized it was so lengthy that search engines and visitors were having real problems with it, so I moved half of it here.  But this gave me the opportunity to add a ton of new stuff that I hadn't been able to add to the main htaccess tutorial.  &#8230; <a href="http://www.askapache.com/htaccess/htaccess-rewrites.html" class="read_more">Read the rest</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.askapache.com/htaccess/htaccess-rewrites.html"></a><a href="http://www.askapache.com/htaccess/htaccess-rewrites.html"><cite>AskApache.com</cite></a></p><p>This is part 2 of the <a href="http://www.askapache.com/htaccess/htaccess.html" title="Htaccess Tutorial like no other">exhaustive Htaccess Tutorial</a>.  I realized it was so lengthy that search engines and visitors were having real problems with it, so I moved half of it here.  But this gave me the opportunity to add a ton of new stuff that I hadn't been able to add to the main htaccess tutorial.  And now this new part 2 is already twice as big as the original!  To sum up, this is a work in progress.</p>


<h2>Moving Half of Original Tutorial to a new URL - SEO Rewriting</h2>
<p>Well, the original tutorial was at /htaccess/apache-htaccess.html, but it was such a huge article that search engines were dropping it!  So I split it into 3 new urls.</p>
<ol>
<li>/htaccess/htaccess.html - 1</li>
<li>/htaccess/htaccess-rewrites.html - Rewrites</li>
<li>/htaccess/apache-htaccess-2.html - Part 2</li>
</ol>

<p>The /htaccess/apache-htaccess-2.html is a lot of unfinished new stuff, and the /htaccess/htaccess-rewrites.html (this very page) still needs to be split several times to get the filesize down.</p>

<h3>301 Link Juice</h3>
<p>The /apache-htaccess.html url has been around since 2006, and it was full of original ideas and examples for using htaccess.  Almost every htaccess guide or tutorial published since then has many of the examples and ideas from that tutorial, (I encourage people to modify and republish everything on this site according to copyright).  I know it, the authors sometimes know it, but the main point is Google for sure knows it.  That's the beauty of creating unique content, Google sees that.  So that /apache-htaccess.html link has extreme link juice, from all the sites, books, papers, and presentations that have linked to it since 2006.</p>

<h4>Filesize Is important</h4>
<p>I like to use my blog as a way to keep notes about my research organized, and I am extremely good at doing research, unfortunately, that means I have a huge article.  The filesize for the html alone is larger than all the other resources like javascript and images, combined.</p>
<ul>
<li>So that means it is very difficult to view on a mobile device, or a slow connection.</li>
<li>For google-bot and other search engine crawlers and robots, this is a huge problem (I made a big mistake letting it get that size).</li>
<li>The robot has to parse an enormous single html file, containing hundreds/thousands of external and internal links, and its such an issue they can decide to just skip indexing that url until the filesize is manageable.</li>
<li>Once again, it's all about the human experience, a huge single file is not good for anyone who isn't printing it out to read offline.</li>
</ul>

<h4>Starting Fresh without losing juice</h4>
<p>So since the page wasn't being indexed much since it was so huge, I decided to split up the content into new separate urls and utilize a 301 Redirect to transfer all the link juice from /apache-htaccess.html to /htaccess.html.</p>


<h2>301 Redirect Timeline</h2>
<ol>
<li>Now, the idea is to take the first pages from the original multi-page guide, do a little improvement on that content, and save it to the new url /htaccess.html.</li>
<li>Then just continue taking the next page from the remaining original guide and creating new pages using the original links structure.  /apache-htaccess-2.html, /apache-htaccess-3.html, etc.. This is a secondary backup to the new /htaccess.html url, which will receive the 301 link juice from the old url, but these secondary pages will help keep the links on external sites good.</li>
<li>Then, I setup a 301 Redirect in my .htaccess file to redirect the old url to the new /htaccess.html url.</li>
<li>Finally, I delete the old url and it is replaced forever by a 301 Redirect pointing to my new location, filesize problems eliminated.</li>
</ol>

<h3>301 Redirect Code Used</h3>
<p>This is so easy to do with RedirectMatch, way faster and easier than using mod_rewrite to handle this, and much less overhead.  Note that this is a general command that I will leave up for a few weeks and slowly tighten it up by looking at my Google Analytics and Apache Logs.  For instance, this first redirectmatch rule is an older RedirectMatch I still have active to redirect all the old links pointing at /2006/htaccess/apache-htaccess.html to /htaccess/apache-htaccess.html from when I ditched the date-based permalinks back in 2007, and you can see it is a little tighter than the 2nd one which also redirects requests for apache-htaccess.html/feed/ or trackback or whatever.</p>
<pre>RedirectMatch 301 ^/2006/.*apache-htaccess.html$ http://www.askapache.com/htaccess/apache-htaccess.html
RedirectMatch 301 ^/.*apache-htaccess.html(.*)$ http://www.askapache.com/htaccess/htaccess.html$1</pre>



<h2>Advanced 301 Redirects for SEO</h2>
<p>I wrote a couple of articles that go into detail about maximizing the SEO with linking and redirects, it remains one of my most helpful articles to anyone trying to rank higher the right way, the Google way.. <a href="http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html">SEO Secrets of AskApache Part 2</a></p><p><a href="http://www.askapache.com/htaccess/htaccess-rewrites.html"></a><a href="http://www.askapache.com/htaccess/htaccess-rewrites.html">Htaccess Rewrites for Moving Urls</a> originally appeared on <cite>AskApache.com</cite> </p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/htaccess-rewrites.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Terminal Escape Code Zen</title>
		<link>http://www.askapache.com/linux/zen-terminal-escape-codes.html</link>
		<comments>http://www.askapache.com/linux/zen-terminal-escape-codes.html#comments</comments>
		<pubDate>Wed, 13 Apr 2011 04:00:27 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=4113</guid>
		<description><![CDATA[<p><strong>An image and technicacl achievement so profound, it will touch yoour heart</strong>..        So 3D... it'll hurt you eyes!  LOL..  lol.. Man I am cracking up here.  haha  Ha definately the best intro ever, those really do look 3D for terminal though huh.. Sweet.  Here is the little function I wrote to output that grey marble.</p>
<p><a href="http://www.askapache.com/linux/zen-terminal-escape-codes.html"><img src="http://uploads.askapache.com/2011/04/3db.png" alt="AskApache Conquers the 3rd Dimension in Bash" title="AskApache Conquers the 3rd Dimension in Bash" width="795" height="481" class="alignnone size-full wp-image-4886" /></a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.askapache.com/linux/zen-terminal-escape-codes.html"></a><a href="http://www.askapache.com/linux/zen-terminal-escape-codes.html"><cite>AskApache.com</cite></a></p><h3>Lightning Strikes Twice!</h3>
<p><a href="http://www.askapache.com/linux/zen-terminal-escape-codes.html"><img src="http://uploads.askapache.com/2011/04/3da.png" alt="AskApache Conquers the 3rd Dimension in Bash" title="AskApache Conquers the 3rd Dimension in Bash" width="892" height="375" class="alignnone size-full wp-image-4885" /></a></p>
<p>LOL.. </p>
<h2>3rd Dimension Broken with Bash!</h2>
<p><a href="http://www.askapache.com/linux/zen-terminal-escape-codes.html"><img src="http://uploads.askapache.com/2011/04/3db.png" alt="AskApache Conquers the 3rd Dimension in Bash" title="AskApache Conquers the 3rd Dimension in Bash" width="795" height="481" class="alignnone size-full wp-image-4886" /></a></p>
<p><strong>So 3D... it'll hurt you eyes!</strong>  lol.. Man I am cracking up here.   Ha but seriously those really do look 3D for terminal though..  I am actually really impressed.   Sweet.  Here is the little function I wrote to output that grey marble.</p>

<p class="cnote">Just a word to the wise, start learning and going over some of these concepts, especially the code used in functions, I will be back in a followup that details actually using this stu.


<p>This function is one of my favorites because it is so fast and useful.  Like when designing a 256color prompt.</p>
<pre>
aa_256 ()
{
    local o x=`tput op` y=`printf %$((${COLUMNS}-6))s`;
    for i in {0..256};
    do
        o=00$i;
        echo -e ${o:${#o}-3:3} `tputm "setaf $i" "setab $i"`${y// /=}$x;
    done
}</pre>



<p>Ya this is actually not very helpful or useful, but there you have it.</p>
<pre>tputm ()
{
    local a;
    for a in "$@";
    do
        echo -en "${a}\n";
    done | tput -S
}</pre>



<p>Some people call this function the grey bringer of death.  Not really.</p>
<pre>a256 ()
{
    ( x=`tput op` y=`printf %$((${COLUMNS}-6))slocal `;
    for i in {242..232} 232 232;
    do
        echo -en "`tput setaf $i;tput setab $i`${y}${x}`tput op`";
    done )
}</pre>



<a href="http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=348099">Fix screen</a>











<h2>Helpful Ncurses Programs</h2>
<table class="bordered"><tbody><tr class="header"><th>Program Name</th><th>Description</th><th>Example Usage</th></tr>
<tr><td>infotocap</td><td>convert a terminfo description into a termcap description</td><td><code></code></td></tr>
<tr><td>tic</td><td>the terminfo entry-description compiler</td><td><code></code></td></tr>
<tr><td>toe</td><td>table of (terminfo) entries</td><td><code>toe -a|sort -d</code></td></tr>
<tr><td>infocmp</td><td>compare or print out terminfo descriptions</td><td><code>infocmp -a  -L -1 -T -x</code></td></tr>
<tr><td>capconvert</td><td>automated conversion from termcap to terminfo</td><td><code></code></td></tr>
<tr><td>stty</td><td>prints or changes terminal characteristics, such as baud rate.</td><td><code></code></td></tr>
<tr><td>clear</td><td>clears the terminal's screen</td><td><code></code></td></tr>
<tr><td>capconvert</td><td>automated conversion from termcap to terminfo</td><td><code></code></td></tr>
</tbody></table>


<h3>ALWAYS check out my functions!</h3>
<p>This function will print out the terminal, show it's colors, etc..  I have some really nice ones in this article that I use for tmux, screen, and that sort of thing.</p>
<pre>c ()
{
    tput clear;
    pm "$TERM: [colors:`tput colors`/`tput pairs`]";
    RC=`tput op` L1=$(L &#039;=&#039; $(( ${COLUMNS} - 25 )));
    for i in `seq ${1:-0} ${2:-16}`;
    do
        o="  $i";
        echo -e " ${o:${#o}-3:3} `tput setaf $i;tput setab $i`${L1}${RC}";
    done
}</pre>








<h2>Standard Capabilities</h2>
<h4>X.364 and iBCS2</h4>
<ul>
<li><code>\033c</code> - <var>RIS</var> - full reset</li>
<li><code>\0337</code> - <var>SC</var> - save cursor</li>
<li><code>\0338</code> - <var>RC</var> - restore cursor</li>
<li><code>\033[r</code> - <var>RSR</var> - not an X.364 mnemonic</li>
<li><code>\033[m</code> - <var>SGR0</var> - not an X.364 mnemonic</li>
<li><code>\033[2J</code> - <var>ED2</var> - clear page</li>
</ul>

<h4>Specified by ISO 2022</h4>
<ul>
<li><code>\033(0</code> - <var>ISO DEC G0</var> - enable DEC graphics for G0</li>
<li><code>\033(A</code> - <var>ISO UK G0</var> - enable UK chars for G0</li>
<li><code>\033(B</code> - <var>ISO US G0</var> - enable US chars for G0</li>
<li><code>\033)0</code> - <var>ISO DEC G1</var> - enable DEC graphics for G1</li>
<li><code>\033)A</code> - <var>ISO UK G1</var> - enable UK chars for G1</li>
<li><code>\033)B</code> - <var>ISO US G1</var> - enable US chars for G1</li>
</ul>


<h2>ISO 2022 charset switching:</h2>
<ul>
   <li><a href="http://www.iso.ch/cate/d22747.html">ISO/IEC 2022:1994</a> </li>
   <li>"Character code structure and extension techniques" </li>
   <li><a href="http://www.ecma.ch/stand/ECMA-035.HTM">ECMA-035</a> </li>
   <li>code structure
      <ul>
         <li>=00..=1F C0 set of <a href="iso6429.html">control characters</a> </li>
         <li>=20..=7F G0 set of 94 or 96 <a href="iso646.html">graphic characters</a> </li>
         <li>=80..=9F C1 set of control characters "C1 controls" </li>
         <li>=A0..=FF G1 set of 94 or 96 graphic characters </li>
         <li>... G2 and G3 </li>
      </ul>
   </li>
   <li><a href="http://www.iso.ch/infoe/agency/2375.htm">registration authority</a>
      <ul>
         <li><a href="http://www.iso.ch/cate/d7217.html">ISO/IEC 2375:1985</a> Procedure for registration of escape sequences </li>
         <li>"ECMA registry" </li>
         <li>ISO-IR registration number </li>
         <li><a href="ftp://dkuug.dk/i18n/iso2375reg.txt">ftp://dkuug.dk/i18n/iso2375reg.txt</a> </li>
         <li><a href="http://www.itscj.ipsj.or.jp/ISO-IR/practice/practice.html">Internaltional</a> <a href="http://www.itscj.ipsj.or.jp/ISO-IR/">register of coded character sets to be used with escape sequences</a> </li>
         <li><a href="http://www.dkuug.dk/jtc1/sc2/wg3/">ISO/IEC JTC1/SC2/WG3</a> </li>
      </ul>
   </li>
   <li>ISO-2022 terminals from Siemens </li>
   <li>recode iso-2022..<a href="http://web.archive.org/web/czyborra.com/utf/#UTF-8">utf-8</a> not yet
      implemented </li>
   <li><a href="cjk.html">CJK charsets</a>
      <ul>
         <li><a href="ftp://ftp.isi.edu/in-notes/rfc1458.txt">ISO-2022-JP</a> </li>
         <li><a href="ftp://ftp.isi.edu/in-notes/rfc1554.txt">ISO-2022-JP-2</a> </li>
         <li><a href="ftp://ftp.isi.edu/in-notes/rfc1557.txt">ISO-2022-KR</a> </li>
         <li><a href="ftp://ftp.isi.edu/in-notes/rfc1922.txt">ISO-2022-CN</a> </li>
         <li><a href="ftp://ftp.isi.edu/in-notes/rfc1922.txt">ISO-2022-CN-EXT</a> </li>
      </ul>
   </li>
</ul>


<h4>DEC private controls widely supported by emulators</h4>
<ul>
<li><code>\033=</code> - <var>DECPAM</var> - application keypad mode</li>
<li><code>\033&gt;</code> - <var>DECPNM</var> - normal keypad mode</li>
<li><code>\033&lt;</code> - <var>DECANSI</var> - enter ANSI mode</li>
<li><code>\033[!p</code> - <var>DECSTR</var> - soft reset</li>
<li><code>\033 F</code> - <var>S7C1T</var> - 7-bit controls</li>
</ul>


<h3>ECMA modes</h3>
<h4>ISO 2022</h4>
<ul>
<li><code>2</code> - <var>AM</var> - keyboard action mode</li>
<li><code>4</code> - <var>IRM</var> - insert/replace mode</li>
<li><code>12</code> - <var>SRM</var> - send/receive mode</li>
<li><code>20</code> - <var>LNM</var> - linefeed mode</li>
</ul>

<h3>DEC modes</h3>
<ul>
<li><code>1</code> - <var>CKM</var> - application cursor keys</li>
<li><code>2</code> - <var>ANM</var> - set VT52 mode</li>
<li><code>3</code> - <var>COLM</var> - 132-column mode</li>
<li><code>4</code> - <var>SCLM</var> - smooth scroll</li>
<li><code>5</code> - <var>SCNM</var> - reverse video mode</li>
<li><code>6</code> - <var>OM</var> - origin mode</li>
<li><code>7</code> - <var>AWM</var> - wraparound mode</li>
<li><code>8</code> - <var>ARM</var> - auto-repeat mode</li>
</ul>

<h3>ECMA attribute sequences</h3>
<ul>
<li><var>0</var> - <code>NORMAL</code> - normal</li>
<li><var>1</var> - <code>+BOLD</code> - bold on</li>
<li><var>2</var> - <code>+DIM</code> - dim on</li>
<li><var>3</var> - <code>+ITALIC</code> - italic on</li>
<li><var>4</var> - <code>+UNDERLINE</code> - underline on</li>
<li><var>5</var> - <code>+BLINK</code> - blink on</li>
<li><var>6</var> - <code>+FASTBLINK</code> - fastblink on</li>
<li><var>7</var> - <code>+REVERSE</code> - reverse on</li>
<li><var>8</var> - <code>+INVISIBLE</code> - invisible on</li>
<li><var>9</var> - <code>+DELETED</code> - deleted on</li>
<li><var>10</var> - <code>MAIN-FONT</code> - select primary font</li>
<li><var>11</var> - <code>ALT-FONT-1</code> - select alternate font 1</li>
<li><var>12</var> - <code>ALT-FONT-2</code> - select alternate font 2</li>
<li><var>13</var> - <code>ALT-FONT-3</code> - select alternate font 3</li>
<li><var>14</var> - <code>ALT-FONT-4</code> - select alternate font 4</li>
<li><var>15</var> - <code>ALT-FONT-5</code> - select alternate font 5</li>
<li><var>16</var> - <code>ALT-FONT-6</code> - select alternate font 6</li>
<li><var>17</var> - <code>ALT-FONT-7</code> - select alternate font 7</li>
<li><var>18</var> - <code>ALT-FONT-1</code> - select alternate font 1</li>
<li><var>19</var> - <code>ALT-FONT-1</code> - select alternate font 1</li>
<li><var>20</var> - <code>FRAKTUR</code> - Fraktur font</li>
<li><var>21</var> - <code>DOUBLEUNDER</code> - double underline</li>
<li><var>22</var> - <code>-DIM</code> - dim off</li>
<li><var>23</var> - <code>-ITALIC</code> - italic off</li>
<li><var>24</var> - <code>-UNDERLINE</code> - underline off</li>
<li><var>25</var> - <code>-BLINK</code> - blink off</li>
<li><var>26</var> - <code>-FASTBLINK</code> - fastblink off</li>
<li><var>27</var> - <code>-REVERSE</code> - reverse off</li>
<li><var>28</var> - <code>-INVISIBLE</code> - invisible off</li>
<li><var>29</var> - <code>-DELETED</code> - deleted off</li>
</ul>



<h3>Init strings</h3>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td><var>is1</var></td><td>init_1string</td></tr>
<tr><td><var>is2</var></td><td>init_2string</td></tr>
<tr><td><var>is3</var></td><td>init_3string</td></tr>
<tr><td><var>rs1</var></td><td>reset_1string</td></tr>
<tr><td><var>rs2</var></td><td>reset_2string</td></tr>
<tr><td><var>rs3</var></td><td>reset_3string</td></tr>
<tr><td><var>smcup</var></td><td>enter_ca_mode</td></tr>
<tr><td><var>rmcup</var></td><td>exit_ca_mode</td></tr>
</tbody></table>

<h3>Cap strings</h3>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td>so</td><td>String of commands to enter standout mode.</td></tr>
<tr><td>se</td><td>String of commands to leave standout mode.</td></tr>
<tr><td>sg</td><td>Numeric capability, the width on the screen of the magic cookie.  This capability is absent in terminals that record appearance modes character by character.</td></tr>
<tr><td>ms</td><td>Flag whose presence means that it is safe to move the cursor while the appearance modes are not in the normal state.  If this flag is absent, programs should always reset the appearance modes to normal before moving the cursor.</td></tr>
<tr><td>xs</td><td>Flag whose presence means that the only way to reset appearance modes already on the screen is to clear to end of line.  On a per-character terminal, you must clear the area where the modes are set.  On a magic cookie terminal, you must clear an area containing the cookie. See the discussion above.</td></tr>
<tr><td>xt</td><td>Flag whose presence means that the cursor cannot be positioned right in front of a magic cookie, and that seis a command to delete the next magic cookie following the cursor.  See discussion above.</td></tr>
<tr><td>mb</td><td>String of commands to enter blinking mode.</td></tr>
<tr><td>md</td><td>String of commands to enter double-bright mode.</td></tr>
<tr><td>mh</td><td>String of commands to enter half-bright mode.</td></tr>
<tr><td>mk</td><td>String of commands to enter invisible mode.</td></tr>
<tr><td>mp</td><td>String of commands to enter protected mode.</td></tr>
<tr><td>mr</td><td>String of commands to enter reverse-video mode.</td></tr>
<tr><td>me</td><td>String of commands to turn off all appearance modes, including standout mode and underline mode.  On some terminals it also turns off alternate character set mode; on others, it may not.  This capability must be present if any of mb<small>...</small> mris present.</td></tr>
<tr><td>as</td><td>String of commands to turn on alternate character set mode.  This mode assigns some or all graphic characters an alternate picture on the screen.  There is no standard as to what the alternate pictures look like.</td></tr>
<tr><td>ae</td><td>String of commands to turn off alternate character set mode.</td></tr>
<tr><td>sa</td><td>String of commands to turn on an arbitrary combination of appearance modes.  It accepts 9 parameters, each of which controls a particular kind of appearance mode.  A parameter should be 1 to turn its appearance mode on, or zero to turn that mode off.  Most terminals do not support the sacapability, even among those that do have various appearance modes.  The nine parameters are, in order,
<ol>
<li><var>standout</var></li><li><var>underline</var> </li><li><var>reverse</var> </li><li><var>blink</var> </li><li><var>half-bright</var> </li><li><var>double-bright</var> </li><li><var>blank</var> </li><li><var>protect</var> </li><li><var>alt char set</var> </li>
</ol>
</td></tr>
</tbody></table>



<h2>Variable and Function Index</h2>
<p>For stty</p>
<ul>
<li><code>BC</code>: tgoto</li>
<li><code>ospeed</code>: Output Padding</li>
<li><code>PC</code>: Output Padding</li>
<li><code>tgetent</code>: Find</li>
<li><code>tgetflag</code>: Interrogate</li>
<li><code>tgetnum</code>: Interrogate</li>
<li><code>tgetstr</code>: Interrogate</li>
<li><code>tgoto</code>: tgoto</li>
<li><code>tparam</code>: tparam</li>
<li><code>tputs</code>: Output Padding</li>
<li><code>UP</code>: tgoto</li>
</ul>


<h2>Summary of Capability Names</h2>
<p>Here are all the terminal capability names in alphabetical order with a brief description of each.  For cross references to their definitions, see the index of capability names.</p>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td>ae</td><td>String to turn off alternate character set mode.</td></tr>
<tr><td>al</td><td>String to insert a blank line before the cursor.</td></tr>
<tr><td>AL</td><td>String to insert <var>n</var> blank lines before the cursor.</td></tr>
<tr><td>am</td><td>Flag: output to last column wraps cursor to next line.</td></tr>
<tr><td>as</td><td>String to turn on alternate character set mode.like.</td></tr>
<tr><td>bc</td><td>Very obsolete alternative name for the lecapability.</td></tr>
<tr><td>bl</td><td>String to sound the bell.</td></tr>
<tr><td>bs</td><td>Obsolete flag: ASCII backspace may be used for leftward motion.</td></tr>
<tr><td>bt</td><td>String to move the cursor left to the previous hardware tab stop column.</td></tr>
<tr><td>bw</td><td>Flag: leat left margin wraps to end of previous line.</td></tr>
<tr><td>CC</td><td>String to change terminal's command character.</td></tr>
<tr><td>cd</td><td>String to clear the line the cursor is on, and following lines.</td></tr>
<tr><td>ce</td><td>String to clear from the cursor to the end of the line.</td></tr>
<tr><td>ch</td><td>String to position the cursor at column <var>c</var> in the same line.</td></tr>
<tr><td>cl</td><td>String to clear the entire screen and put cursor at upper left corner.</td></tr>
<tr><td>cm</td><td>String to position the cursor at line <var>l</var>, column <var>c</var>.</td></tr>
<tr><td>CM</td><td>String to position the cursor at line <var>l</var>, column <var>c</var>, relative to display memory.</td></tr>
<tr><td>co</td><td>Number: width of the screen.</td></tr>
<tr><td>cr</td><td>String to move cursor sideways to left margin.</td></tr>
<tr><td>cs</td><td>String to set the scroll region.</td></tr>
<tr><td>cS</td><td>Alternate form of string to set the scroll region.</td></tr>
<tr><td>ct</td><td>String to clear all tab stops.</td></tr>
<tr><td>cv</td><td>String to position the cursor at line <var>l</var> in the same column.</td></tr>
<tr><td>da</td><td>Flag: data scrolled off top of screen may be scrolled back.</td></tr>
<tr><td>db</td><td>Flag: data scrolled off bottom of screen may be scrolled back.</td></tr>
<tr><td>dB</td><td>Obsolete number: msec of padding needed for the backspace character.</td></tr>
<tr><td>dc</td><td>String to delete one character position at the cursor.</td></tr>
<tr><td>dC</td><td>Obsolete number: msec of padding needed for the carriage-return character.</td></tr>
<tr><td>DC</td><td>String to delete <var>n</var> characters starting at the cursor.</td></tr>
<tr><td>dF</td><td>Obsolete number: msec of padding needed for the formfeed character.</td></tr>
<tr><td>dl</td><td>String to delete the line the cursor is on.</td></tr>
<tr><td>DL</td><td>String to delete <var>n</var> lines starting with the cursor's line.</td></tr>
<tr><td>dm</td><td>String to enter delete mode.</td></tr>
<tr><td>dN</td><td>Obsolete number: msec of padding needed for the newline character.</td></tr>
<tr><td>do</td><td>String to move the cursor vertically down one line.</td></tr>
<tr><td>DO</td><td>String to move cursor vertically down <var>n</var> lines.</td></tr>
<tr><td>ds</td><td>String to disable the display of the status line.</td></tr>
<tr><td>dT</td><td>Obsolete number: msec of padding needed for the tab character.</td></tr>
<tr><td>ec</td><td>String of commands to clear <var>n</var> characters at cursor.</td></tr>
<tr><td>ed</td><td>String to exit delete mode.</td></tr>
<tr><td>ei</td><td>String to leave insert mode.</td></tr>
<tr><td>eo</td><td>Flag: output of a space can erase an overstrike.</td></tr>
<tr><td>es</td><td>Flag: other display commands work while writing the status line.</td></tr>
<tr><td>ff</td><td>String to advance to the next page, for a hardcopy terminal.</td></tr>
<tr><td>fs</td><td>String to move the cursor back from the status line to its previous position (outside the status line).</td></tr>
<tr><td>gn</td><td>Flag: this terminal type is generic, not real.</td></tr>
<tr><td>hc</td><td>Flag: hardcopy terminal.</td></tr>
<tr><td>hd</td><td>String to move the cursor down half a line.</td></tr>
<tr><td>ho</td><td>String to position cursor at upper left corner.</td></tr>
<tr><td>hs</td><td>Flag: the terminal has a status line.</td></tr>
<tr><td>hu</td><td>String to move the cursor up half a line.</td></tr>
<tr><td>hz</td><td>Flag: terminal cannot accept ~as output.</td></tr>
<tr><td>i1</td><td>String to initialize the terminal for each login session.</td></tr>
<tr><td>i3</td><td>String to initialize the terminal for each login session.</td></tr>
<tr><td>ic</td><td>String to insert one character position at the cursor.</td></tr>
<tr><td>IC</td><td>String to insert <var>n</var> character positions at the cursor.</td></tr>
<tr><td>if</td><td>String naming a file of commands to initialize the terminal.</td></tr>
<tr><td>im</td><td>String to enter insert mode.</td></tr>
<tr><td>in</td><td>Flag: outputting a space is different from moving over empty positions.</td></tr>
<tr><td>ip</td><td>String to output following an inserted character in insert mode.</td></tr>
<tr><td>is</td><td>String to initialize the terminal for each login session.</td></tr>
<tr><td>it</td><td>Number: initial spacing between hardware tab stop columns.</td></tr>
<tr><td>k0</td><td>String of input sent by function key 0 or 10.</td></tr>
<tr><td>k1 ... k9</td><td>Strings of input sent by function keys 1 through 9.</td></tr>
<tr><td>K1 ... K5</td><td>Strings sent by the five other keys in 3-by-3 array with arrows.</td></tr>
<tr><td>ka</td><td>String of input sent by the “clear all tabs” key.</td></tr>
<tr><td>kA</td><td>String of input sent by the “insert line” key.</td></tr>
<tr><td>kb</td><td>String of input sent by the “backspace” key.</td></tr>
<tr><td>kC</td><td>String of input sent by the “clear screen” key.</td></tr>
<tr><td>kd</td><td>String of input sent by typing the down-arrow key.</td></tr>
<tr><td>kD</td><td>String of input sent by the “delete character” key.</td></tr>
<tr><td>ke</td><td>String to make the function keys work locally.</td></tr>
<tr><td>kE</td><td>String of input sent by the “clear to end of line” key.</td></tr>
<tr><td>kF</td><td>String of input sent by the “scroll forward” key.</td></tr>
<tr><td>kh</td><td>String of input sent by typing the “home-position” key.</td></tr>
<tr><td>kH</td><td>String of input sent by the “home down” key.</td></tr>
<tr><td>kI</td><td>String of input sent by the “insert character” or “enter insert mode” key.</td></tr>
<tr><td>kl</td><td>String of input sent by typing the left-arrow key.</td></tr>
<tr><td>kL</td><td>String of input sent by the “delete line” key.</td></tr>
<tr><td>km</td><td>Flag: the terminal has a Meta key.</td></tr>
<tr><td>kM</td><td>String of input sent by the “exit insert mode” key.</td></tr>
<tr><td>kn</td><td>Numeric value, the number of numbered function keys.</td></tr>
<tr><td>kN</td><td>String of input sent by the “next page” key.</td></tr>
<tr><td>ko</td><td>Very obsolete string listing the terminal's named function keys.</td></tr>
<tr><td>kP</td><td>String of input sent by the “previous page” key.</td></tr>
<tr><td>kr</td><td>String of input sent by typing the right-arrow key.</td></tr>
<tr><td>kR</td><td>String of input sent by the “scroll reverse” key.</td></tr>
<tr><td>ks</td><td>String to make the function keys transmit.</td></tr>
<tr><td>kS</td><td>String of input sent by the “clear to end of screen” key.</td></tr>
<tr><td>kt</td><td>String of input sent by the “clear tab stop this column” key.</td></tr>
<tr><td>kT</td><td>String of input sent by the “set tab stop in this column” key.</td></tr>
<tr><td>ku</td><td>String of input sent by typing the up-arrow key.</td></tr>
<tr><td>l0</td><td>String on keyboard labelling function key 0 or 10.</td></tr>
<tr><td>l1 ... l9</td><td>Strings on keyboard labelling function keys 1 through 9.</td></tr>
<tr><td>le</td><td>String to move the cursor left one column.</td></tr>
<tr><td>LE</td><td>String to move cursor left <var>n</var> columns.</td></tr>
<tr><td>li</td><td>Number: height of the screen.</td></tr>
<tr><td>ll</td><td>String to position cursor at lower left corner.</td></tr>
<tr><td>lm</td><td>Number: lines of display memory.</td></tr>
<tr><td>LP</td><td>Flag: writing to last column of last line will not scroll.</td></tr>
<tr><td>mb</td><td>String to enter blinking mode.</td></tr>
<tr><td>md</td><td>String to enter double-bright mode.</td></tr>
<tr><td>me</td><td>String to turn off all appearance modes</td></tr>
<tr><td>mh</td><td>String to enter half-bright mode.</td></tr>
<tr><td>mi</td><td>Flag: cursor motion in insert mode is safe.</td></tr>
<tr><td>mk</td><td>String to enter invisible mode.</td></tr>
<tr><td>mm</td><td>String to enable the functioning of the Meta key.</td></tr>
<tr><td>mo</td><td>String to disable the functioning of the Meta key.</td></tr>
<tr><td>mp</td><td>String to enter protected mode.</td></tr>
<tr><td>mr</td><td>String to enter reverse-video mode.</td></tr>
<tr><td>ms</td><td>Flag: cursor motion in standout mode is safe.</td></tr>
<tr><td>nc</td><td>Obsolete flag: do not use ASCII carriage-return on this terminal.</td></tr>
<tr><td>nd</td><td>String to move the cursor right one column.</td></tr>
<tr><td>NF</td><td>Flag: do not use XON/XOFF flow control.</td></tr>
<tr><td>nl</td><td>Obsolete alternative name for the doand sfcapabilities.</td></tr>
<tr><td>ns</td><td>Flag: the terminal does not normally scroll for sequential output.</td></tr>
<tr><td>nw</td><td>String to move to start of next line, possibly clearing rest of old line.</td></tr>
<tr><td>os</td><td>Flag: terminal can overstrike.</td></tr>
<tr><td>pb</td><td>Number: the lowest baud rate at which padding is actually needed.</td></tr>
<tr><td>pc</td><td>String containing character for padding.</td></tr>
<tr><td>pf</td><td>String to terminate redirection of output to the printer.</td></tr>
<tr><td>po</td><td>String to redirect further output to the printer.</td></tr>
<tr><td>pO</td><td>String to redirect <var>n</var> characters ofoutput to the printer.</td></tr>
<tr><td>ps</td><td>String to print the screen on the attached printer.</td></tr>
<tr><td>rc</td><td>String to move to last saved cursor position.</td></tr>
<tr><td>RI</td><td>String to move cursor right <var>n</var> columns.</td></tr>
<tr><td>rp</td><td>String to output character <var>c</var> repeated <var>n</var> times.</td></tr>
<tr><td>rs</td><td>String to reset the terminal from any strange modes.</td></tr>
<tr><td>sa</td><td>String to turn on an arbitrary combination of appearance modes.</td></tr>
<tr><td>sc</td><td>String to save the current cursor position.</td></tr>
<tr><td>se</td><td>String to leave standout mode.</td></tr>
<tr><td>sf</td><td>String to scroll the screen one line up.</td></tr>
<tr><td>SF</td><td>String to scroll the screen <var>n</var> lines up.</td></tr>
<tr><td>sg</td><td>Number: width of magic standout cookie.  Absent if magic cookies are not used.</td></tr>
<tr><td>so</td><td>String to enter standout mode.</td></tr>
<tr><td>sr</td><td>String to scroll the screen one line down.</td></tr>
<tr><td>SR</td><td>String to scroll the screen <var>n</var> line down.</td></tr>
<tr><td>st</td><td>String to set tab stop at current cursor column on all lines. programs.</td></tr>
<tr><td>ta</td><td>String to move the cursor right to the next hardware tab stop column.</td></tr>
<tr><td>te</td><td>String to return terminal to settings for sequential output.</td></tr>
<tr><td>ti</td><td>String to initialize terminal for random cursor motion.</td></tr>
<tr><td>ts</td><td>String to move the terminal cursor into the status line.</td></tr>
<tr><td>uc</td><td>String to underline one character and move cursor right.</td></tr>
<tr><td>ue</td><td>String to turn off underline mode</td></tr>
<tr><td>ug</td><td>Number: width of underlining magic cookie.  Absent if underlining doesn't use magic cookies.</td></tr>
<tr><td>ul</td><td>Flag: underline by overstriking with an underscore.</td></tr>
<tr><td>up</td><td>String to move the cursor vertically up one line.</td></tr>
<tr><td>UP</td><td>String to move cursor vertically up <var>n</var> lines.</td></tr>
<tr><td>us</td><td>String to turn on underline mode</td></tr>
<tr><td>vb</td><td>String to make the screen flash.</td></tr>
<tr><td>ve</td><td>String to return the cursor to normal.</td></tr>
<tr><td>vi</td><td>String to make the cursor invisible.</td></tr>
<tr><td>vs</td><td>String to enhance the cursor.</td></tr>
<tr><td>wi</td><td>String to set the terminal output screen window.</td></tr>
<tr><td>ws</td><td>Number: the width of the status line.</td></tr>
<tr><td>xb</td><td>Flag: superbee terminal.</td></tr>
<tr><td>xn</td><td>Flag: cursor wraps in a strange way.</td></tr>
<tr><td>xs</td><td>Flag: clearing a line is the only way to clear the appearance modes of positions in that line (or, only way to remove magic cookies on that line).</td></tr>
<tr><td>xt</td><td>Flag: Teleray 1061; several strange characteristics.</td></tr>
</tbody></table>

<h2>Variable and Function Index</h2>
<ul>
<li><code>BC</code>: tgoto</li>
<li><code>ospeed</code>: Output Padding</li>
<li><code>PC</code>: Output Padding</li>
<li><code>tgetent</code>: Find</li>
<li><code>tgetflag</code>: Interrogate</li>
<li><code>tgetnum</code>: Interrogate</li>
<li><code>tgetstr</code>: Interrogate</li>
<li><code>tgoto</code>: tgoto</li>
<li><code>tparam</code>: tparam</li>
<li><code>tputs</code>: Output Padding</li>
<li><code>UP</code>: tgoto</li>
</ul>

<hr class="HR" />

<ul>
<li><code>ae</code>: Standout</li>
<li><code>AL</code>: Insdel Line</li>
<li><code>al</code>: Insdel Line</li>
<li><code>am</code>: Wrapping</li>
<li><code>as</code>: Standout</li>
<li><code>bc</code>: Cursor Motion</li>
<li><code>bl</code>: Bell</li>
<li><code>bs</code>: Cursor Motion</li>
<li><code>bt</code>: Cursor Motion</li>
<li><code>bw</code>: Cursor Motion</li>
<li><code>CC</code>: Basic</li>
<li><code>cd</code>: Clearing</li>
<li><code>ce</code>: Clearing</li>
<li><code>ch</code>: Cursor Motion</li>
<li><code>cl</code>: Clearing</li>
<li><code>CM</code>: Cursor Motion</li>
<li><code>cm</code>: Cursor Motion</li>
<li><code>co</code>: Screen Size</li>
<li><code>cr</code>: Cursor Motion</li>
<li><code>cS</code>: Scrolling</li>
<li><code>cs</code>: Scrolling</li>
<li><code>ct</code>: Initialization</li>
<li><code>cv</code>: Cursor Motion</li>
<li><code>da</code>: Scrolling</li>
<li><code>dB</code>: Pad Specs</li>
<li><code>db</code>: Scrolling</li>
<li><code>dC</code>: Pad Specs</li>
<li><code>DC</code>: Insdel Char</li>
<li><code>dc</code>: Insdel Char</li>
<li><code>dF</code>: Pad Specs</li>
<li><code>DL</code>: Insdel Line</li>
<li><code>dl</code>: Insdel Line</li>
<li><code>dm</code>: Insdel Char</li>
<li><code>dN</code>: Pad Specs</li>
<li><code>DO</code>: Cursor Motion</li>
<li><code>do</code>: Cursor Motion</li>
<li><code>ds</code>: Status Line</li>
<li><code>dT</code>: Pad Specs</li>
<li><code>ec</code>: Clearing</li>
<li><code>ed</code>: Insdel Char</li>
<li><code>ei</code>: Insdel Char</li>
<li><code>eo</code>: Basic</li>
<li><code>es</code>: Status Line</li>
<li><code>ff</code>: Cursor Motion</li>
<li><code>fs</code>: Status Line</li>
<li><code>gn</code>: Basic</li>
<li><code>hc</code>: Basic</li>
<li><code>hd</code>: Half-Line</li>
<li><code>ho</code>: Cursor Motion</li>
<li><code>hs</code>: Status Line</li>
<li><code>hu</code>: Half-Line</li>
<li><code>hz</code>: Basic</li>
<li><code>i1</code>: Initialization</li>
<li><code>i3</code>: Initialization</li>
<li><code>IC</code>: Insdel Char</li>
<li><code>ic</code>: Insdel Char</li>
<li><code>if</code>: Initialization</li>
<li><code>im</code>: Insdel Char</li>
<li><code>in</code>: Insdel Char</li>
<li><code>ip</code>: Insdel Char</li>
<li><code>is</code>: Initialization</li>
<li><code>it</code>: Initialization</li>
<li><code>K1...K5</code>: Keypad</li>
<li><code>k1...k9</code>: Keypad</li>
<li><code>kA...kT</code>: Keypad</li>
<li><code>ka...ku</code>: Keypad</li>
<li><code>km</code>: Meta Key</li>
<li><code>l0...l9</code>: Keypad</li>
<li><code>LE</code>: Cursor Motion</li>
<li><code>le</code>: Cursor Motion</li>
<li><code>li</code>: Screen Size</li>
<li><code>ll</code>: Cursor Motion</li>
<li><code>lm</code>: Scrolling</li>
<li><code>LP</code>: Wrapping</li>
<li><code>mb</code>: Standout</li>
<li><code>md</code>: Standout</li>
<li><code>me</code>: Standout</li>
<li><code>mh</code>: Standout</li>
<li><code>mi</code>: Insdel Char</li>
<li><code>mk</code>: Standout</li>
<li><code>mm</code>: Meta Key</li>
<li><code>mo</code>: Meta Key</li>
<li><code>mp</code>: Standout</li>
<li><code>mr</code>: Standout</li>
<li><code>ms</code>: Underlining</li>
<li><code>ms</code>: Standout</li>
<li><code>nc</code>: Cursor Motion</li>
<li><code>nd</code>: Cursor Motion</li>
<li><code>NF</code>: Initialization</li>
<li><code>nl</code>: Cursor Motion</li>
<li><code>ns</code>: Scrolling</li>
<li><code>nw</code>: Cursor Motion</li>
<li><code>os</code>: Basic</li>
<li><code>pb</code>: Pad Specs</li>
<li><code>pc</code>: Pad Specs</li>
<li><code>pf</code>: Printer</li>
<li><code>pO</code>: Printer</li>
<li><code>po</code>: Printer</li>
<li><code>ps</code>: Printer</li>
<li><code>rc</code>: Cursor Motion</li>
<li><code>RI</code>: Cursor Motion</li>
<li><code>rp</code>: Basic</li>
<li><code>rs</code>: Initialization</li>
<li><code>sa</code>: Standout</li>
<li><code>sc</code>: Cursor Motion</li>
<li><code>se</code>: Standout</li>
<li><code>SF</code>: Scrolling</li>
<li><code>sf</code>: Scrolling</li>
<li><code>sg</code>: Standout</li>
<li><code>so</code>: Standout</li>
<li><code>SR</code>: Scrolling</li>
<li><code>sr</code>: Scrolling</li>
<li><code>st</code>: Initialization</li>
<li><code>ta</code>: Cursor Motion</li>
<li><code>te</code>: Initialization</li>
<li><code>ti</code>: Initialization</li>
<li><code>ts</code>: Status Line</li>
<li><code>uc</code>: Underlining</li>
<li><code>ue</code>: Underlining</li>
<li><code>ug</code>: Underlining</li>
<li><code>ul</code>: Underlining</li>
<li><code>UP</code>: Cursor Motion</li>
<li><code>up</code>: Cursor Motion</li>
<li><code>us</code>: Underlining</li>
<li><code>vb</code>: Bell</li>
<li><code>ve</code>: Cursor Visibility</li>
<li><code>vi</code>: Cursor Visibility</li>
<li><code>vs</code>: Cursor Visibility</li>
<li><code>wi</code>: Windows</li>
<li><code>ws</code>: Status Line</li>
<li><code>xb</code>: Basic</li>
<li><code>xn</code>: Wrapping</li>
<li><code>xs</code>: Standout</li>
<li><code>xt</code>: Standout</li>
<li><code>xt</code>: Cursor Motion</li>
</ul>





<hr class="HR" />

<ul>
<li>Basic:        Basic characteristics.</li>
<li>Screen Size:   Screen size, and what happens when it changes.</li>
<li>Cursor Motion:   Various ways to move the cursor.</li>
<li>Wrapping:     What happens if you write a character in the last column.</li>
<li>Scrolling:    Pushing text up and down on the screen.</li>
<li>Windows:      Limiting the part of the window that output affects.</li>
<li>Clearing:     Erasing one or many lines.</li>
<li>Insdel Line:   Making new blank lines in mid-screen; deleting lines.</li>
<li>Insdel Char:   Inserting and deleting characters within a line.</li>
<li>Standout:     Highlighting some of the text.</li>
<li>Underlining:   Underlining some of the text.</li>
<li>Cursor Visibility:   Making the cursor more or less easy to spot.</li>
<li>Bell:         Attracts user's attention; not localized on the screen.</li>
<li>Keypad:  Recognizing when function keys or arrows are typed.</li>
<li>Meta Key:     META acts like an extra shift key.</li>
<li>Initialization:   Commands used to initialize or reset the terminal.</li>
<li>Pad Specs:    Info for the kernel on how much padding is needed.</li>
<li>Status Line:   A status line displays <code>background</code> information.</li>
<li>Half-Line:    Moving by half-lines, for superscripts and subscripts.</li>
<li>Printer:      Controlling auxiliary printers of display terminals.</li>
</ul>
<hr class="HR" />





<h2>Translated Term Capabilities</h2>
<pre></pre>
<p>This is helpful so you can understand what a term cap does, by looking at the long name.</p>
<table class="bordered"><tbody><tr class="header"><th>Tput Name</th><th>Terminfo Long Name</th></tr>
<tr><td>@7</td><td>key_end</td></tr><tr><td>AB</td><td>set_a_background</td></tr><tr><td>AF</td><td>set_a_foreground</td></tr><tr><td>AL</td><td>parm_insert_line</td></tr><tr><td>AX</td><td>AX</td></tr><tr><td>Co</td><td>max_colors</td></tr><tr><td>DC</td><td>parm_dch</td></tr><tr><td>DL</td><td>parm_delete_line</td></tr><tr><td>DO</td><td>parm_down_cursor</td></tr><tr><td>E0</td><td>E0</td></tr><tr><td>F1</td><td>key_f11</td></tr><tr><td>F2</td><td>key_f12</td></tr><tr><td>G0</td><td>G0</td></tr><tr><td>HC</td><td>5i</td></tr><tr><td>IC</td><td>parm_ich</td></tr><tr><td>Ic</td><td>initialize_color</td></tr><tr><td>Km</td><td>delete_line</td></tr><tr><td>LE</td><td>parm_left_cursor</td></tr><tr><td>NC</td><td>no_color_video</td></tr><tr><td>ND</td><td>MT</td></tr><tr><td>NP</td><td>NL</td></tr><tr><td>RI</td><td>parm_right_cursor</td></tr><tr><td>S0</td><td>S0</td></tr><tr><td>UP</td><td>parm_up_cursor</td></tr><tr><td>YA</td><td>NR</td></tr><tr><td>YC</td><td>YB</td></tr><tr><td>YE</td><td>YD</td></tr><tr><td>YG</td><td>YF</td></tr><tr><td>ac</td><td>acs_chars</td></tr><tr><td>ae</td><td>exit_alt_charset_mode</td></tr><tr><td>al</td><td>insert_line</td></tr><tr><td>am</td><td>auto_right_margin</td></tr><tr><td>as</td><td>enter_alt_charset_mode</td></tr><tr><td>back_color_erase</td><td>backspaces_with_bs</td></tr><tr><td>bl</td><td>bell</td></tr><tr><td>bs</td><td>eat_newline_glitch</td></tr><tr><td>bt</td><td>back_tab</td></tr><tr><td>bw</td><td>auto_left_margin</td></tr><tr><td>cb</td><td>clr_bol</td></tr><tr><td>cc</td><td>can_change</td></tr><tr><td>cd</td><td>clr_eos</td></tr><tr><td>ce</td><td>clr_eol</td></tr><tr><td>cl</td><td>clear_screen</td></tr><tr><td>cm</td><td>cursor_address</td></tr><tr><td>co</td><td>columns</td></tr><tr><td>col_addr_glitch</td><td>ceol_standout_glitch</td></tr><tr><td>cpi_changes_res</td><td>cr_cancels_micro_mode</td></tr><tr><td>cr</td><td>carriage_return</td></tr><tr><td>cs</td><td>change_scroll_region</td></tr><tr><td>ct</td><td>clear_all_tabs</td></tr><tr><td>cursor_up</td><td>scroll_reverse</td></tr><tr><td>da</td><td>crt_no_scrolling</td></tr><tr><td>db</td><td>dest_tabs_magic_smso</td></tr><tr><td>dc</td><td>delete_character</td></tr><tr><td>dl</td><td>key_mouse</td></tr><tr><td>do</td><td>cursor_down</td></tr><tr><td>eA</td><td>ena_acs</td></tr><tr><td>ei</td><td>exit_insert_mode</td></tr><tr><td>eo</td><td>erase_overstrike</td></tr><tr><td>es</td><td>generic_type</td></tr><tr><td>gn</td><td>gnu_has_meta_key</td></tr><tr><td>hard_copy</td><td>hard_cursor</td></tr><tr><td>has_meta_key</td><td>has_hardware_tabs</td></tr><tr><td>has_status_line</td><td>has_print_wheel</td></tr><tr><td>hl</td><td>hc</td></tr><tr><td>ho</td><td>cursor_home</td></tr><tr><td>hs</td><td>hue_lightness_saturation</td></tr><tr><td>im</td><td>enter_insert_mode</td></tr><tr><td>in</td><td>hz</td></tr><tr><td>insert_null_glitch</td><td>linefeed_is_newline</td></tr><tr><td>is</td><td>init_2string</td></tr><tr><td>it</td><td>init_tabs</td></tr><tr><td>k1</td><td>key_f1</td></tr><tr><td>k2</td><td>key_f2</td></tr><tr><td>k3</td><td>key_f3</td></tr><tr><td>k4</td><td>key_f4</td></tr><tr><td>k5</td><td>key_f5</td></tr><tr><td>k6</td><td>key_f6</td></tr><tr><td>k7</td><td>key_f7</td></tr><tr><td>k8</td><td>key_f8</td></tr><tr><td>k9</td><td>key_f9</td></tr><tr><td>k;</td><td>key_f10</td></tr><tr><td>kB</td><td>key_btab</td></tr><tr><td>kD</td><td>key_dc</td></tr><tr><td>kI</td><td>key_ic</td></tr><tr><td>kN</td><td>key_npage</td></tr><tr><td>kP</td><td>key_ppage</td></tr><tr><td>kb</td><td>cursor_left</td></tr><tr><td>kd</td><td>key_down</td></tr><tr><td>ke</td><td>keypad_local</td></tr><tr><td>kh</td><td>key_home</td></tr><tr><td>kl</td><td>key_left</td></tr><tr><td>kr</td><td>key_right</td></tr><tr><td>ks</td><td>keypad_xmit</td></tr><tr><td>ku</td><td>key_up</td></tr><tr><td>le</td><td>key_backspace</td></tr><tr><td>li</td><td>lines</td></tr><tr><td>mb</td><td>enter_blink_mode</td></tr><tr><td>md</td><td>enter_bold_mode</td></tr><tr><td>me</td><td>exit_attribute_mode</td></tr><tr><td>memory_above</td><td>lpi_changes_res</td></tr><tr><td>mi</td><td>km</td></tr><tr><td>move_insert_mode</td><td>move_standout_mode</td></tr><tr><td>mr</td><td>enter_reverse_mode</td></tr><tr><td>nc</td><td>memory_below</td></tr><tr><td>nd</td><td>cursor_right</td></tr><tr><td>needs_xon_xoff</td><td>no_correctly_working_cr</td></tr><tr><td>no_pad_char</td><td>no_esc_ctlc</td></tr><tr><td>non_rev_rmcup</td><td>non_dest_scroll_region</td></tr><tr><td>nw</td><td>newline</td></tr><tr><td>nx</td><td>ns</td></tr><tr><td>op</td><td>orig_pair</td></tr><tr><td>os</td><td>over_strike</td></tr><tr><td>pa</td><td>max_pairs</td></tr><tr><td>prtr_silent</td><td>return_does_clr_eol</td></tr><tr><td>pt</td><td>ms</td></tr><tr><td>r2</td><td>reset_2string</td></tr><tr><td>rc</td><td>restore_cursor</td></tr><tr><td>row_addr_glitch</td><td>semi_auto_right_margin</td></tr><tr><td>sa</td><td>set_attributes</td></tr><tr><td>sc</td><td>save_cursor</td></tr><tr><td>se</td><td>exit_standout_mode</td></tr><tr><td>sf</td><td>scroll_forward</td></tr><tr><td>so</td><td>enter_standout_mode</td></tr><tr><td>st</td><td>set_tab</td></tr><tr><td>ta</td><td>tab</td></tr><tr><td>te</td><td>exit_ca_mode</td></tr><tr><td>ti</td><td>enter_ca_mode</td></tr><tr><td>tilde_glitch</td><td>status_line_esc_ok</td></tr><tr><td>ue</td><td>exit_underline_mode</td></tr><tr><td>ul</td><td>transparent_underline</td></tr><tr><td>up</td><td>sr</td></tr><tr><td>us</td><td>enter_underline_mode</td></tr><tr><td>vb</td><td>flash_screen</td></tr><tr><td>ve</td><td>cursor_normal</td></tr><tr><td>vi</td><td>cursor_invisible</td></tr><tr><td>vs</td><td>cursor_visible</td></tr><tr><td>xn</td><td>ut</td></tr><tr><td>xo</td><td>xb</td></tr><tr><td>xr</td><td>xon_xoff</td></tr><tr><td>xt</td><td>xs</td></tr></tbody></table>


<h2>List of All Terminals</h2>
<p>You can view this list with the following command:</p>
<pre>$ toe -a|sort -d</pre>





<h2><a href="http://vt100.net/docs/vt100-ug/chapter3.html#S3.3.2">VT100 keypad Diagram</a></h2>
<p><a href="http://vt100.net/docs/vt100-ug/chapter3.html#S3.3.2">VT100 LINK</a></p>
<p>Here's a diagram of the VT100 keypad keys with their bindings.  The top line is the name of the key (some DEC keyboards have the keys labelled somewhat differently, like GOLD instead of PF1, but this is the most "official" name).  The second line is the escape sequence it generates in Application Keypad mode (where "$" means the ESC character).  The third line contains two items, first the mapping of the key in terminfo, and then in termcap.</p>
<pre>   _______________________________________
  |   PF1   |   PF2   |   PF3   |   PF4   |
  |   $OP   |   $OQ   |   $OR   |   $OS   |
  |_kf1__k1_|_kf2__k2_|_kf3__k3_|_kf4__k4_|
  |    7         8         9         -    |
  |   $Ow   |   $Ox   |   $Oy   |   $Om   |
  |_kf9__k9_|_kf10_k;_|_kf0__k0_|_________|
  |    4    |    5    |    6    |    ,    |
  |   $Ot   |   $Ou   |   $Ov   |   $Ol   |
  |_kf5__k5_|_kf6__k6_|_kf7__k7_|_kf8__k8_|
  |    1    |    2    |    3    |         |
  |   $Oq   |   $Or   |   $Os   |  enter  |
  |_ka1__K1_|_kb2__K2_|_ka3__K3_|  $OM    |
  |         0         |   .     |         |
  |        $Op        |  $On    |         |
  |___kc1_______K4____|_kc3__K5_|_kent_@8_|</pre>

<p>A better adaptation to modern keyboards such as the PC's, which have a dozen function keys and the keypad 2,4,6,8 keys are labeled with arrows keys, is to use the 5-key arrangement to model the arrow keys as suggested in the terminfo guidelines:</p>
<pre>   _______________________________________
  |   PF1   |   PF2   |   PF3   |   PF4   |
  |   $OP   |   $OQ   |   $OR   |   $OS   |
  |_kf1__k1_|_kf2__k2_|_kf3__k3_|_kf4__k4_|
  |    7         8         9         -    |
  |   $Ow   |   $Ox   |   $Oy   |   $Om   |
  |_ka1__K1_|_________|_ka3__K3_|_________|
  |    4    |    5    |    6    |    ,    |
  |   $Ot   |   $Ou   |   $Ov   |   $Ol   |
  |_________|_kb2__K2_|_________|_________|
  |    1    |    2    |    3    |         |
  |   $Oq   |   $Or   |   $Os   |  enter  |
  |_kc1__K4_|_________|_kc3__K5_|  $OM    |
  |         0         |   .     |         |
  |        $Op        |  $On    |         |
  |___________________|_________|_kent_@8_|</pre>





<h2>SGR parameter values</h2>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td><var>0</var></td><td>default mode (attributes off)</td></tr>
<tr><td><var>1</var></td><td>bold</td></tr>
<tr><td><var>2</var></td><td>dim</td></tr>
<tr><td><var>3</var></td><td>italicized</td></tr>
<tr><td><var>4</var></td><td>underlined</td></tr>
<tr><td><var>5</var></td><td>slow blink</td></tr>
<tr><td><var>6</var></td><td>fast blink</td></tr>
<tr><td><var>7</var></td><td>reverse video</td></tr>
<tr><td><var>8</var></td><td>invisible</td></tr>
<tr><td><var>9</var></td><td>crossed-out (marked for deletion)</td></tr>
<tr><td><var>10</var></td><td>primary font [10 + n (n in 1..9) = nth alternative font]</td></tr>
<tr><td><var>20</var></td><td>Fraktur</td></tr>
<tr><td><var>21</var></td><td>double underline</td></tr>
<tr><td><var>22</var></td><td>turn off 2</td></tr>
<tr><td><var>23</var></td><td>turn off 3</td></tr>
<tr><td><var>24</var></td><td>turn off 4</td></tr>
<tr><td><var>25</var></td><td>turn off 5</td></tr>
<tr><td><var>26</var></td><td>proportional spacing</td></tr>
<tr><td><var>27</var></td><td>turn off 7</td></tr>
<tr><td><var>28</var></td><td>turn off 8</td></tr>
<tr><td><var>29</var></td><td>turn off 9</td></tr>
<tr><td><var>30</var></td><td>black fg</td></tr>
<tr><td><var>31</var></td><td>red fg</td></tr>
<tr><td><var>32</var></td><td>green fg</td></tr>
<tr><td><var>33</var></td><td>yellow fg</td></tr>
<tr><td><var>34</var></td><td>blue fg</td></tr>
<tr><td><var>35</var></td><td>magenta fg</td></tr>
<tr><td><var>36</var></td><td>cyan fg</td></tr>
<tr><td><var>37</var></td><td>white fg</td></tr>
<tr><td><var>38</var></td><td>set fg color as in CCIT T.416</td></tr>
<tr><td><var>39</var></td><td>set default fg color</td></tr>
<tr><td><var>40</var></td><td>black bg</td></tr>
<tr><td><var>41</var></td><td>red bg</td></tr>
<tr><td><var>42</var></td><td>green bg</td></tr>
<tr><td><var>43</var></td><td>yellow bg</td></tr>
<tr><td><var>44</var></td><td>blue bg</td></tr>
<tr><td><var>45</var></td><td>magenta bg</td></tr>
<tr><td><var>46</var></td><td>cyan bg</td></tr>
<tr><td><var>47</var></td><td>white bg</td></tr>
<tr><td><var>48</var></td><td>set bg color as in CCIT T.416</td></tr>
<tr><td><var>39</var></td><td>set default bg color</td></tr>
<tr><td><var>50</var></td><td>turn off 26</td></tr>
<tr><td><var>51</var></td><td>framed</td></tr>
<tr><td><var>52</var></td><td>encircled</td></tr>
<tr><td><var>53</var></td><td>overlined</td></tr>
<tr><td><var>54</var></td><td>turn off 51 &amp; 52</td></tr>
<tr><td><var>55</var></td><td>not overlined</td></tr>
<tr><td><var>56-59</var></td><td>reserved</td></tr>
<tr><td><var>61-65</var></td><td>variable highlights for ideograms.</td></tr>
</tbody></table>






<pre>Sequence     Sequence                             Parameter   or
Mnemonic     Name              Sequence           Value      Mode   terminfo
-----------------------------------------------------------------------------
APC  Applicatn Program Command \E _                -         Delim  -
BEL  Bell *                    ^G                  -         -      bel
BPH  Break Permitted Here *    \E B                -         *      -
BS   Backpace *                ^H                  -         EF     -
CAN  Cancel *                  ^X                  -         -      -   (A)
CBT  Cursor Backward Tab       \E [ Pn Z           1         eF     cbt
CCH  Cancel Previous Character \E T                -         -      -
CHA  Cursor Horizntal Absolute \E [ Pn G           1         eF     hpa (B)
CHT  Cursor Horizontal Tab     \E [ Pn I           1         eF     tab (C)
CMD  Coding Method Delimiter * \E
CNL  Cursor Next Line          \E [ Pn E           1         eF     nel (D)
CPL  Cursor Preceding Line     \E [ Pn F           1         eF     -
CPR  Cursor Position Report    \E [ Pn ; Pn R      1, 1      -      -   (E)
CSI  Control Sequence Intro    \E [                -         Intro  -
CTC  Cursor Tabulation Control \E [ Ps W           0         eF     -   (F)
CUB  Cursor Backward           \E [ Pn D           1         eF     cub
CUD  Cursor Down               \E [ Pn B           1         eF     cud
CUF  Cursor Forward            \E [ Pn C           1         eF     cuf
CUP  Cursor Position           \E [ Pn ; Pn H      1, 1      eF     cup (G)
CUU  Cursor Up                 \E [ Pn A           1         eF     cuu
CVT  Cursor Vertical Tab       \E [ Pn Y           -         eF     -   (H)
DA   Device Attributes         \E [ Pn c           0         -      -
DAQ  Define Area Qualification \E [ Ps o           0         -      -
DCH  Delete Character          \E [ Pn P           1         eF     dch
DCS  Device Control String     \E P                -         Delim  -
DL   Delete Line               \E [ Pn M           1         eF     dl
DLE  Data Link Escape *        ^P                  -         -      -
DMI  Disable Manual Input      \E \                -         Fs     -
DSR  Device Status Report      \E [ Ps n           0         -      -   (I)
DTA  Dimension Text Area *     \E [ Pn ; Pn SPC T  -         PC     -
EA   Erase in Area             \E [ Ps O           0         eF     -   (J)
ECH  Erase Character           \E [ Pn X           1         eF     ech
ED   Erase in Display          \E [ Ps J           0         eF     ed  (J)
EF   Erase in Field            \E [ Ps N           0         eF     -
EL   Erase in Line             \E [ Ps K           0         eF     el  (J)
EM   End of Medium *           ^Y                  -         -      -
EMI  Enable Manual Input       \E b                          Fs     -
ENQ  Enquire                   ^E                  -         -      -
EOT  End Of Transmission       ^D                  -         *      -
EPA  End of Protected Area     \E W                -         -      -   (K)
ESA  End of Selected Area      \E G                -         -      -
ESC  Escape                    ^[                  -         -      -
ETB  End Transmission Block    ^W                  -         -      -
ETX  End of Text               ^C                  -         -      -
FF   Form Feed                 ^L                  -         -      -
FNK  Function Key *            \E [ Pn SPC W       -         -      -
GCC  Graphic Char Combination* \E [ Pn ; Pn SPC B  -         -      -
FNT  Font Selection            \E [ Pn ; Pn SPC D  0, 0      FE     -
GSM  Graphic Size Modify       \E [ Pn ; Pn SPC B  100, 100  FE     -   (L)
GSS  Graphic Size Selection    \E [ Pn SPC C       none      FE     -
HPA  Horz Position Absolute    \E [ Pn `           1         FE     -   (B)
HPB  Char Position Backward    \E [ j              1         FE     -
HPR  Horz Position Relative    \E [ Pn a           1         FE     -   (M)
HT   Horizontal Tab *          ^I                  -         FE     -   (N)
HTJ  Horz Tab w/Justification  \E I                -         FE     -
HTS  Horizontal Tab Set        \E H                -         FE     hts
HVP  Horz &amp;amp; Vertical Position  \E [ Pn ; Pn f      1, 1      FE     -   (G)
ICH  Insert Character          \E [ Pn @           1         eF     ich
IDCS ID Device Control String  \E [ SPC O          -         *      -
IGS  ID Graphic Subrepertoire  \E [ SPC M          -         *      -
IL   Insert Line               \E [ Pn L           1         eF     il
IND  Index                     \E D                -         FE     -
INT  Interrupt                 \E a                -         Fs     -
JFY  Justify                   \E [ Ps SPC F       0         FE     -
IS1  Info Separator #1 *       ^_                  -         *      -
IS2  Info Separator #1 *       ^^                  -         *      -
IS3  Info Separator #1 *       ^]                  -         *      -
IS4  Info Separator #1 *       ^\                  -         *      -
LF   Line Feed                 ^J                  -         -      -
LS1R Locking Shift Right 1 *   \E ~                -         -      -
LS2  Locking Shift 2 *         \E n                -         -      -
LS2R Locking Shift Right 2 *   \E }                -         -      -
LS3  Locking Shift 3 *         \E o                -         -      -
LS3R Locking Shift Right 3 *   \E |                -         -      -
MC   Media Copy                \E [ Ps i           0         -      -   (S)
MW   Message Waiting           \E U                -         -      -
NAK  Negative Acknowledge *    ^U                  -         *      -
NBH  No Break Here *           \E C                -         -      -
NEL  Next Line                 \E E                -         FE     nel (D)
NP   Next Page                 \E [ Pn U           1         eF     -
NUL  Null *                    ^@                  -         -      -
OSC  Operating System Command  \E ]                -         Delim  -
PEC  Pres. Expand/Contract *   \E Pn SPC Z         0         -      -
PFS  Page Format Selection *   \E Pn SPC J         0         -      -
PLD  Partial Line Down         \E K                -         FE     -   (T)
PLU  Partial Line Up           \E L                -         FE     -   (U)
PM   Privacy Message           \E ^                -         Delim  -
PP   Preceding Page            \E [ Pn V           1         eF     -
PPA  Page Position Absolute *  \E [ Pn SPC P       1         FE     -
PPB  Page Position Backward *  \E [ Pn SPC R       1         FE     -
PPR  Page Position Forward *   \E [ Pn SPC Q       1         FE     -
PTX  Parallel Texts *          \E [ \              -         -      -
PU1  Private Use 1             \E Q                -         -      -
PU2  Private Use 2             \E R                -         -      -
QUAD Typographic Quadding      \E [ Ps SPC H       0         FE     -
REP  Repeat Char or Control    \E [ Pn b           1         -      rep
RI   Reverse Index             \E M                -         FE     -   (V)
RIS  Reset to Initial State    \E c                -         Fs     -
RM   Reset Mode *              \E [ Ps l           -         -      -   (W)
SACS Set Add. Char. Sep. *     \E [ Pn SPC /       0         -      -
SAPV Sel. Alt. Present. Var. * \E [ Ps SPC ]       0         -      -   (X)
SCI  Single-Char Introducer    \E Z                -         -      -
SCO  Sel. Char. Orientation *  \E [ Pn ; Pn SPC k  -         -      -
SCS  Set Char. Spacing *       \E [ Pn SPC g       -         -      -
SD   Scroll Down               \E [ Pn T           1         eF     rin
SDS  Start Directed String *   \E [ Pn ]           1         -      -
SEE  Select Editing Extent     \E [ Ps Q           0         -      -   (Y)
SEF  Sheet Eject &amp;amp; Feed *  \E [ Ps ; Ps SPC Y  0,0       -      -
SGR  Select Graphic Rendition  \E [ Ps m           0         FE     sgr (O)
SHS  Select Char. Spacing *    \E [ Ps SPC K       0         -      -
SI   Shift In                  ^O                  -         -      -   (P)
SIMD Sel. Imp. Move Direct. *  \E [ Ps ^           -         -      -
SL   Scroll Left               \E [ Pn SPC @       1         eF     -
SLH  Set Line Home *           \E [ Pn SPC U       -         -      -
SLL  Set Line Limit *          \E [ Pn SPC V       -         -      -
SLS  Set Line Spacing *        \E [ Pn SPC h       -         -      -
SM   Select Mode               \E [ Ps h           none      -      -   (W)
SO   Shift Out                 ^N                  -         -      -   (Q)
SOH  Start Of Heading *        ^A                  -         -      -
SOS  Start of String *         \E X                -         -      -
SPA  Start of Protected Area   \E V                -         -      -   (Z)
SPD  Select Pres. Direction *  \E [ Ps ; Ps SPC S  0,0       -      -
SPH  Set Page Home *           \E [ Ps SPC G       -         -      -
SPI  Spacing Increment         \E [ Pn ; Pn SPC G  none      FE     -
SPL  Set Page Limit *          \E [ Ps SPC j       -         -      -
SPQR Set Pr. Qual. &amp;amp; Rapid. *  \E [ Ps SPC X       0         -      -
SR   Scroll Right              \E [ Pn SPC A       1         eF     -
SRCS Set Reduced Char. Sep. *  \E [ Pn SPC f       0         -      -
SRS  Start Reversed String *   \E [ Ps [           0         -      -
SSA  Start of Selected Area    \E F                -         -      -
SSU  Select Size Unit *        \E [ Pn SPC I       0         -      -
SSW  Set Space Width *         \E [ Pn SPC [       none      -      -
SS2  Single Shift 2 (G2 set)   \E N                -         Intro  -
SS3  Single Shift 3 (G3 set)   \E O                -         Intro  -
ST   String Terminator         \E \                -         Delim  -
STAB Selective Tabulation *    \E [ Pn SPC ^       -         -      -
STS  Set Transmit State        \E S                -         -      -
STX  Start pf Text *           ^B                  -         -      -
SU   Scroll Up                 \E [ Pn S           1         eF     indn
SUB  Substitute *              ^Z                  -         -      -
SVS  Select Line Spacing *     \E [ Pn SPC \       1         -      -
SYN  Synchronous Idle *        ^F                  -         -      -
TAC  Tabul. Aligned Centered * \E [ Pn SPC b       -         -      -
TALE Tabul. Al. Leading Edge * \E [ Pn SPC a       -         -      -
TATE Tabul. Al. Trailing Edge* \E [ Pn SPC `       -         -      -
TBC  Tab Clear                 \E [ Ps g           0         FE     tbc
TCC  Tabul. Centered on Char * \E [ Pn SPC c       -         -      -
TSR  Tabulation Stop Remove  * \E [ Pn SPC d       -         FE     -
TSS  Thin Space Specification  \E [ Pn SC E        none      FE     -
VPA  Vert. Position Absolute   \E [ Pn d           1         FE     vpa
VPB  Line Position Backward *  \E [ Pn k           1         FE     -
VPR  Vert. Position Relative   \E [ Pn e           1         FE     -   (R)
VPR  Vert. Position Relative   \E [ Pn e           1         FE     -   (R)
VT   Vertical Tabulation *     ^K                  -         FE     -
VTS  Vertical Tabulation Set   \E J                -         FE     -</pre>









<h3>Basic Characteristics</h3>
<p>This section documents the capabilities that describe the basic and nature of the terminal, and also those that are relevant to the output of graphic characters.</p>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td>os</td><td>Flag whose presence means that the terminal can overstrike.  This means that outputting a graphic character does not erase whatever was present in the same character position before.  The terminals that can overstrike include printing terminals, storage tubes (all obsolete nowadays), and many bit-map displays.</td></tr>
<tr><td>eo</td><td>Flag whose presence means that outputting a space erases a character position even if the terminal supports overstriking.  If this flag is not present and overstriking is supported, output of a space has no effect except to move the cursor.  (On terminals that do not support overstriking, you can always assume that outputting a space at a position erases whatever character was previously displayed there.)</td></tr>
<tr><td>gn</td><td>Flag whose presence means that this terminal type is a generic type which does not really describe any particular terminal.  Generic types are intended for use as the default type assigned when the user connects to the system, with the intention that the user should specify what type he really has.  One example of a generic type is the type <code>network</code>.  Since the generic type cannot say how to do anything interesting with the terminal, termcap-using programs will always find that the terminal is too weak to be supported if the user has failed to specify a real terminal type in place of the generic one.  The gnflag directs these programs to use a different error message: “You have not specified your real terminal type”, rather than “Your terminal is not powerful enough to be used”.</td></tr>
<tr><td>hc</td><td>Flag whose presence means this is a hardcopy terminal.</td></tr>
<tr><td>rp</td><td>String of commands to output a graphic character <var>c</var>, repeated <var>n</var> times.  The first parameter value is the ASCII code for the desired character, and the second parameter is the number of times to repeat the character.  Often this command requires padding proportional to the number of times the character is repeated.  This effect can be had by using parameter arithmetic with <code>&lt;samp&gt;%&lt;/samp&gt;</code>-sequences to compute the amount of padding, then generating the result as a number at the front of the string so that <code>tputs</code> will treat it as padding.</td></tr>
<tr><td>hz</td><td>Flag whose presence means that the ASCII character cannot be output on this terminal because it is used for display commands.  Programs handle this flag by checking all text to be output and replacing each ~with some other character(s).  If this is not done, the screen will be thoroughly garbled.  The old Hazeltine terminals that required such treatment are probably very rare today, so you might as well not bother to support this flag.</td></tr>
<tr><td>CC</td><td>String whose presence means the terminal has a settable command character.  The value of the string is the default command character (which is usually &lt;ESC&gt;).  All the strings of commands in the terminal description should be written to use the default command character.  If you are writing an application program that changes the command character, use the CCcapability to figure out how to translate all the display commands to work with the new command character.  Most programs have no reason to look at the CCcapability.</td></tr>
<tr><td>xb</td><td>Flag whose presence identifies Superbee terminals which are unable to transmit the characters &lt;ESC&gt; and <kbd>Control-C</kbd>.  Programs which support this flag are supposed to check the input for the code sequences sent by the &lt;F1&gt; and &lt;F2&gt; keys, and pretend that &lt;ESC&gt; or <kbd>Control-C</kbd> (respectively) had been read.  But this flag is obsolete, and not worth supporting.</td></tr>
</tbody></table>

<h2>7bit vs. 8bit</h2>
<p>These recommendations are optional.  IBCS2 allows the leading escape to # be either the 7-bit <code>\E[</code> or 8-bit <code>\0233</code> introducer, in accordance with # the ANSI X.364/ISO 6429/ECMA-48 standard.</p>
<blockquote><cite>1.6.1 Describing the Encoding</cite> <p>For example, the <code>cm</code> string for a standard ANSI terminal is written as <code>\E[%i%d;%dH</code>.  (<code>\E</code> stands for .)  <code>cm</code> by convention always requires two parameters, the vertical and horizontal goal positions, so this string specifies the encoding of two parameters.  Here <code>%i</code> increments the two values supplied, and each <code>%d</code> encodes one of the values in decimal.  If the cursor position values 20,58 are encoded with this string, the result is <code>\E[21;59H</code>.</p></blockquote>
<p>First, here are the <code>%</code>-sequences that generate output.  Except for <code>%%</code>, each of them encodes one parameter and advances the pointer to the following parameter.</p>
<ul>
<li><code>%%</code> Output a single <code>%</code>.  This is the only way to represent a literal <code>%</code> in a terminal command with parameters.  <code>%%</code> does not use up a parameter.</li>
<li><code>%d</code> As in <code>printf</code>, output the next parameter in decimal.</li>
<li><code>%2</code> Like <code>%02d</code> in <code>printf</code>: output the next parameter in decimal, and always use at least two digits.</li>
<li><code>%3</code> Like <code>%03d</code> in <code>printf</code>: output the next parameter in decimal, and always use at least three digits.  Note that <code>%4</code> and so on are _not_ defined.</li>
<li><code>%.</code> Output the next parameter as a single character whose ASCII code is the parameter value.  Like <code>%c</code> in <code>printf</code>.</li>
<li><code>%+CHAR</code> Add the next parameter to the character CHAR, and output the resulting character.  For example, <code>%+ </code> represents 0 as a space, 1 as <code>!</code>, etc.</li>
</ul>

<p>The following <code>%</code>-sequences specify alteration of the parameters (their values, or their order) rather than encoding a parameter for output.  They generate no output; they are used only for their side effects on the parameters.  Also, they do not advance the "next parameter" pointer except as explicitly stated.  Only <code>%i</code>, <code>%r</code> and <code>%&gt;</code> are defined in standard Unix termcap.  The others are GNU extensions.</p>
<ul>
<li><code>%i</code> Increment the next two parameters.  This is used for terminals that expect cursor positions in origin 1.  For example, <code>%i%d,%d</code> would output two parameters with <code>1</code> for 0, <code>2</code> for 1, etc.</li>
<li><code>%r</code> Interchange the next two parameters.  This is used for terminals whose cursor positioning command expects the horizontal position first.</li>
<li><code>%s</code> Skip the next parameter.  Do not output anything.</li>
<li><code>%b</code> Back up one parameter.  The last parameter used will become once again the next parameter to be output, and the next output command will use it.  Using <code>%b</code> more than once, you can back up any number of parameters, and you can refer to each parameter any number of times.</li>
<li><code>%&gt;C1C2</code> Conditionally increment the next parameter.  Here C1 and C2 are characters which stand for their ASCII codes as numbers.  If the next parameter is greater than the ASCII code of C1, the ASCII code of C2 is added to it.</li>
<li><code>%a OP TYPE POS</code> Perform arithmetic on the next parameter, do not use it up, and do not output anything.  Here OP specifies the arithmetic operation, while TYPE and POS together specify the other operand.</li>
</ul>


<p>Spaces are used above to separate the operands for clarity; the spaces don't appear in the data base, where this sequence is exactly five characters long.  The character OP says what kind of arithmetic operation to perform.  It can be any of these characters:</p>
<ul>
<li><var>=</var> - assign a value to the next parameter, ignoring its old value.   The new value comes from the other operand.</li>
<li><var>+</var> - add the other operand to the next parameter.</li>
<li><var>-</var> - subtract the other operand from the next parameter.</li>
<li><var>*</var> - multiply the next parameter by the other operand.</li>
<li><var>/</var> - divide the next parameter by the other operand.</li>
</ul>

<p>The "other operand" may be another parameter's value or a constant; the character TYPE says which.  It can be:</p>
<ul>
<li><var>p</var> - Use another parameter.  The character POS says which   parameter to use.  Subtract 64 from its ASCII code to get the   position of the desired parameter relative to this one.  Thus,   the character <code>A</code> as POS means the parameter after the next   one; the character <code>?</code> means the parameter before the next   one.</li>
<li><var>c</var> - Use a constant value.  The character POS specifies the value   of the constant.  The 0200 bit is cleared out, so that 0200   can be used to represent zero.</li>
</ul>

<p>The following <code>%</code>-sequences are special purpose hacks to compensate for the weird designs of obscure terminals.  They modify the next parameter or the next two parameters but do not generate output and do not use up any parameters.  <code>%m</code> is a GNU extension; the others are defined in standard Unix termcap.</p>
<ul>
<li><var>%n</var> - Exclusive-or the next parameter with 0140, and likewise the parameter after next.</li>
<li><var>%m</var> - Complement all the bits of the next parameter and the parameter after next.</li>
<li><var>%B</var> - Encode the next parameter in BCD.  It alters the value of the parameter by adding six times the quotient of the parameter by ten. Here is a C statement that shows how the new value is computed:  <code>PARM = (PARM / 10) * 16 + PARM % 10;</code></li>
<li><var>%D</var> - Transform the next parameter as needed by Delta Data terminals. This involves subtracting twice the remainder of the parameter by 16.  <code>PARM -= 2 * (PARM % 16);</code></li>
</ul>

<h2>Terminal Type Name Conventions</h2>
<p>Here is a list of standard suffixes and their conventional meanings:</p>
<ul>
<li><var>-w</var> - Short for "wide".  This is a mode that gives the terminal more columns than usual.  This is normally a user option.</li>
<li><var>-am</var> - "Automatic margins".  This is an alternate description for use when the terminal's margin-wrap switch is on; it contains the <code>am</code> flag.  The implication is that normally the switch is off and the usual description for the terminal says that the switch is off.</li>
<li><var>-nam</var> - "No automatic margins".  The opposite of <code>-am</code>, this names an alternative description which lacks the <code>am</code> flag.  This implies that the terminal is normally operated with the margin-wrap switch turned on, and the normal description of the terminal says so.</li>
<li><var>-na</var> - "No arrows".  This terminal description initializes the terminal to keep its arrow keys in local mode.  This is a user option.</li>
<li><var>-rv</var> - "Reverse video".  This terminal description causes text output for normal video to appear as reverse, and text output for reverse video to come out as normal.  Often this description differs from the usual one by interchanging the two strings which turn reverse video on and off.</li>
</ul>

<p>This is a user option; you can choose either the "reverse video" variant terminal type or the normal terminal type, and termcap will obey.</p>
<ul>
<li><var>-s</var> - "Status".  Says to enable use of a status line which ordinary output does not touch (*note Status Line::).</li>
</ul>

<p>Some terminals have a special line that is used only as a status line.  For these terminals, there is no need for an <code>-s</code> variant; the status line commands should be defined by default.  On other terminals, enabling a status line means removing one screen line from ordinary use and reducing the effective screen height.  For these terminals, the user can choose the <code>-s</code> variant type to request use of a status line.</p>
<ul>
<li><var>-NLINES</var> - Says to operate with NLINES lines on the screen, for terminals such as the Ambassador which provide this as an option.  Normally this is a user option; by choosing the terminal type, you control how many lines termcap will use.</li>
<li><var>-NPAGESp</var> - Says that the terminal has NPAGES pages worth of screen memory, for terminals where this is a hardware option.</li>
<li><var>-unk</var> - Says that description is not for direct use, but only for reference in <code>tc</code> capabilities.  Such a description is a kind of subroutine, because it describes the common characteristics of several variant descriptions that would use other suffixes in place of <code>-unk</code>.</li>
</ul>

<h2>MS-DOS ANSI.SYS</h2>
<p>Here is a description of the color and attribute controls supported in the ANSI.SYS driver under MS-DOS.  Most console drivers and ANSI terminal emulators for Intel boxes obey these.  They are a proper subset of the ECMA-48 escapes.</p>
<p>Bright black becomes gray, bright brown becomes yellow. These coincide with the prescriptions of the ISO 6429/ECMA-48 standard.  * If the 5 attribute is on and you set a background color (40-47) it is supposed to enable bright background.</p>
<pre>0        all attributes off
1        foreground bright
4        underscore on
5        blink on/background bright (not reliable with brown)
7        reverse-video
8        set blank (non-display)
10       set primary font
11       set first alternate font (on PCs, display ROM characters 1-31)
12       set second alternate font (on PCs, display IBM high-half chars)
3n       set foreground color       / 0=black, 1=red,     2=green, 3=brown,
4n       set background color       \ 4=blue,  5=magenta, 6=cyan,  7=white</pre>

<h2>STTY</h2>
<h3>Stty Control Settings</h3>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td>parenb</td><td><code>parenb</code> Generate parity bit in output and expect parity bit in input.  May be negated.</td></tr>
<tr><td>parodd</td><td>Set odd parity (even if negated).  May be negated.</td></tr>
<tr><td>cs5, cs6, cs7, cs8</td><td>Set character size to 5, 6, 7, or 8 bits.</td></tr>
<tr><td>hup, hupcl</td><td>Send a hangup signal when the last process closes the tty.  May be negated.</td></tr>
<tr><td>cstopb</td><td>Use two stop bits per character (one if negated).  May be negated.</td></tr>
<tr><td>cread</td><td>Allow input to be received.  May be negated.</td></tr>
<tr><td>clocal</td><td>Disable modem control signals.  May be negated.</td></tr>
<tr><td>crtscts</td><td>Enable RTS/CTS flow control. Disables DTR/DSR flow control. Non-POSIX.  May be negated.</td></tr>
<tr><td>cdtrdsr</td><td>Enable DTR/DSR flow control. Disables RTS/CTS flow control. Non-POSIX.  May be negated.  No stty-readable form available.  It needs to be supported by device.  Usage on device without DTR/DSR support could lead to an error and failure of <code>stty</code>.</td></tr>
</tbody></table><h3>Stty Input settings</h3>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td>ignbrk</td><td>Ignore break characters.  May be negated.</td></tr>
<tr><td>brkint</td><td>Make breaks cause an interrupt signal.  May be negated.</td></tr>
<tr><td>ignpar</td><td>Ignore characters with parity errors.  May be negated.</td></tr>
<tr><td>parmrk</td><td>Mark parity errors (with a 255-0-character sequence).  May be negated.</td></tr>
<tr><td>inpck</td><td>Enable input parity checking.  May be negated.</td></tr>
<tr><td>istrip</td><td>Clear high (8th) bit of input characters.  May be negated.</td></tr>
<tr><td>inlcr</td><td>Translate newline to carriage return.  May be negated.</td></tr>
<tr><td>igncr</td><td>Ignore carriage return.  May be negated.</td></tr>
<tr><td>icrnl</td><td>Translate carriage return to newline.  May be negated.</td></tr>
<tr><td>iutf8</td><td>Assume input characters are UTF-8 encoded.  May be negated.</td></tr>
<tr><td>ixon</td><td>Enable XON/XOFF flow control (that is, <code>CTRL-S</code>/<code>CTRL-Q</code>).  May be negated.</td></tr>
<tr><td>ixoff, tandem</td><td>Enable sending of <code>stop</code> character when the system input buffer is almost full, and <code>start</code> character when it becomes almost empty again.  May be negated.</td></tr>
<tr><td>iuclc</td><td>Translate uppercase characters to lowercase.  Non-POSIX.  May be negated.</td></tr>
<tr><td>ixany</td><td>Allow any character to restart output (only the start character if negated).  Non-POSIX.  May be negated.</td></tr>
<tr><td>imaxbel</td><td>Enable beeping and not flushing input buffer if a character arrives when the input buffer is full.  Non-POSIX.  May be negated.</td></tr>
</tbody></table>
<h3>Stty Output settings</h3>
<p>These arguments specify output-related operations.</p>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td>opost</td><td>Postprocess output.  May be negated.</td></tr>
<tr><td>olcuc</td><td>Translate lowercase characters to uppercase.  Non-POSIX.  May be negated.</td></tr>
<tr><td>ocrnl</td><td>Translate carriage return to newline.  Non-POSIX.  May be negated.</td></tr>
<tr><td>onlcr</td><td>Translate newline to carriage return-newline.  Non-POSIX.  May be negated.</td></tr>
<tr><td>onocr</td><td>Do not print carriage returns in the first column.  Non-POSIX. May be negated.</td></tr>
<tr><td>onlret</td><td>Newline performs a carriage return.  Non-POSIX.  May be negated.</td></tr>
<tr><td>ofill</td><td>Use fill (padding) characters instead of timing for delays. Non-POSIX.  May be negated.</td></tr>
<tr><td>ofdel</td><td>Use delete characters for fill instead of null characters. Non-POSIX.  May be negated.</td></tr>
<tr><td>nl1, nl0</td><td>Newline delay style.  Non-POSIX.</td></tr>
<tr><td>cr3, cr2, cr1, cr0</td><td>Carriage return delay style.  Non-POSIX.</td></tr>
<tr><td>tab3, tab2, tab1, tab0</td><td>Horizontal tab delay style.  Non-POSIX.</td></tr>
<tr><td>bs1, bs0</td><td>Backspace delay style.  Non-POSIX.</td></tr>
<tr><td>vt1, vt0</td><td>Vertical tab delay style.  Non-POSIX.</td></tr>
<tr><td>ff1, ff0</td><td>Form feed delay style.  Non-POSIX.</td></tr>
</tbody></table>
<h3>Stty Local settings</h3>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td>isig</td><td>Enable <code>interrupt</code>, <code>quit</code>, and <code>suspend</code> special characters.  May be negated.</td></tr>
<tr><td>icanon</td><td>Enable <code>erase</code>, <code>kill</code>, <code>werase</code>, and <code>rprnt</code> special characters. May be negated.</td></tr>
<tr><td>iexten</td><td>Enable non-POSIX special characters.  May be negated.</td></tr>
<tr><td>echo</td><td>Echo input characters.  May be negated.</td></tr>
<tr><td>echoe, crterase</td><td>Echo <code>erase</code> characters as backspace-space-backspace.  May be negated.</td></tr>
<tr><td>echok</td><td>Echo a newline after a <code>kill</code> character.  May be negated.</td></tr>
<tr><td>echonl</td><td>Echo newline even if not echoing other characters.  May be negated.</td></tr>
<tr><td>noflsh</td><td>Disable flushing after <code>interrupt</code> and <code>quit</code> special characters. May be negated.</td></tr>
<tr><td>xcase</td><td>Enable input and output of uppercase characters by preceding their lowercase equivalents with <code>\</code>, when <code>icanon</code> is set.  Non-POSIX. May be negated.</td></tr>
<tr><td>tostop</td><td>Stop background jobs that try to write to the terminal.  Non-POSIX. May be negated.</td></tr>
<tr><td>echoprt, prterase</td><td>Echo erased characters backward, between <code>\</code> and <code>/</code>.  Non-POSIX. May be negated.</td></tr>
<tr><td>echoctl, ctlecho</td><td>Echo control characters in hat notation (<code>^C</code>) instead of literally.  Non-POSIX.  May be negated.</td></tr>
<tr><td>echoke, crtkill</td><td>Echo the <code>kill</code> special character by erasing each character on the line as indicated by the <code>echoprt</code> and <code>echoe</code> settings, instead of by the <code>echoctl</code> and <code>echok</code> settings.  Non-POSIX.  May be negated.</td></tr>
</tbody></table>
<h3>Stty Combination settings</h3>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td>evenp, parity</td><td>Same as <code>parenb -parodd cs7</code>.  May be negated.  If negated, same as <code>-parenb cs8</code>.</td></tr>
<tr><td>oddp</td><td>Same as <code>parenb parodd cs7</code>.  May be negated.  If negated, same as <code>-parenb cs8</code>.</td></tr>
<tr><td>nl</td><td>Same as <code>-icrnl -onlcr</code>.  May be negated.  If negated, same as <code>icrnl -inlcr -igncr onlcr -ocrnl -onlret</code>.</td></tr>
<tr><td>ek</td><td>Reset the <code>erase</code> and <code>kill</code> special characters to their default values.</td></tr>
<tr><td>sane</td><td>Sets all special characters to their default values and: <pre>cread -ignbrk brkint -inlcr -igncr icrnl -ixoff -iuclc -ixany imaxbel opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke</pre></td></tr>
<tr><td>cooked</td><td>Same as <code>brkint ignpar istrip icrnl ixon opost isig icanon</code>, plus sets the <code>eof</code> and <code>eol</code> characters to their default values if they are the same as the <code>min</code> and <code>time</code> characters.  May be negated.  If negated, same as <code>raw</code>.</td></tr>
<tr><td>raw</td><td>Same as: <pre>-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl -ixon -ixoff -iuclc -ixany -imaxbel -opost -isig -icanon -xcase min 1 time 0</pre> May be negated.  If negated, same as <code>cooked</code>.</td></tr>
<tr><td>cbreak</td><td>Same as <code>-icanon</code>.  May be negated.  If negated, same as <code>icanon</code>.</td></tr>
<tr><td>pass8</td><td>Same as <code>-parenb -istrip cs8</code>.  May be negated.  If negated, same as <code>parenb istrip cs7</code>.</td></tr>
<tr><td>litout</td><td>Same as <code>-parenb -istrip -opost cs8</code>.  May be negated.  If negated, same as <code>parenb istrip opost cs7</code>.</td></tr>
<tr><td>decctlq</td><td>Same as <code>-ixany</code>.  Non-POSIX.  May be negated.</td></tr>
<tr><td>tabs</td><td>Same as <code>tab0</code>.  Non-POSIX.  May be negated.  If negated, same as <code>tab3</code>.</td></tr>
<tr><td>lcase, LCASE</td><td>Same as <code>xcase iuclc olcuc</code>.  Non-POSIX.  May be negated.</td></tr>
<tr><td>crt</td><td>Same as <code>echoe echoctl echoke</code>.</td></tr>
<tr><td>dec</td><td>Same as <code>echoe echoctl echoke -ixany intr ^C erase ^? kill C-u</code>.</td></tr>
</tbody></table>

<h3>Special characters</h3>
<p>The special characters' default values vary from system to system. They are set with the syntax <code>name value</code>, where the names are listed below and the value can be given either literally, in hat notation (<code>^C</code>), or as an integer which may start with <code>0x</code> to indicate hexadecimal, <code>0</code> to indicate octal, or any other digit to indicate decimal.</p>
<p>For GNU stty, giving a value of <code>^-</code> or <code>undef</code> disables that special character.  (This is incompatible with Ultrix <code>stty</code>, which uses  a value of <code>u</code> to disable a special character.  GNU <code>stty</code> treats a value <code>u</code> like any other, namely to set that special character to .)</p>
<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td><var>intr</var></td><td>Send an interrupt signal.</td></tr>
<tr><td><var>quit</var></td><td>Send a quit signal.</td></tr>
<tr><td><var>erase</var></td><td>Erase the last character typed.</td></tr>
<tr><td><var>kill</var></td><td>Erase the current line.</td></tr>
<tr><td><var>eof</var></td><td>Send an end of file (terminate the input).</td></tr>
<tr><td><var>eol</var></td><td>End the line.</td></tr>
<tr><td><var>eol2</var></td><td>Alternate character to end the line.  Non-POSIX.</td></tr>
<tr><td><var>swtch</var></td><td>Switch to a different shell layer.  Non-POSIX.</td></tr>
<tr><td><var>start</var></td><td>Restart the output after stopping it.</td></tr>
<tr><td><var>stop</var></td><td>Stop the output.</td></tr>
<tr><td><var>susp</var></td><td>Send a terminal stop signal.</td></tr>
<tr><td><var>dsusp</var></td><td>Send a terminal stop signal after flushing the input.  Non-POSIX.</td></tr>
<tr><td><var>rprnt</var></td><td>Redraw the current line.  Non-POSIX.</td></tr>
<tr><td><var>werase</var></td><td>Erase the last word typed.  Non-POSIX.</td></tr>
<tr><td><var>lnext</var></td><td>Enter the next character typed literally, even if it is a special character.  Non-POSIX.</td></tr>
</tbody></table>


<h3>Special settings</h3>
<ul>
<li><var>min N</var> - Set the minimum number of characters that will satisfy a read until the time value has expired, when <code>-icanon</code> is set.</li>
<li><var>time N</var> - Set the number of tenths of a second before reads time out if the minimum number of characters have not been read, when <code>-icanon</code> is set.</li>
<li><var>ispeed N</var> - Set the input speed to N.</li>
<li><var>ospeed N</var> - Set the output speed to N.</li>
<li><var>rows N</var> - Tell the tty kernel driver that the terminal has N rows. Non-POSIX.</li>
<li><var>cols N</var>, <var>columns N</var> - Tell the kernel that the terminal has N columns.  Non-POSIX.</li>
<li><var>size</var> - Print the number of rows and columns that the kernel thinks the terminal has.  (Systems that don't support rows and columns in the kernel typically use the environment variables <code>LINES</code> and <code>COLUMNS</code> instead; however, GNU <code>stty</code> does not know anything about them.)  Non-POSIX.</li>
<li><var>line N</var> - Use line discipline N.  Non-POSIX.</li>
<li><var>speed</var> - Print the terminal speed.</li>
<li><var>N</var> - Set the input and output speeds to N.  N can be one of: 0 50 75 110 134 134.5 150 200 300 600 1200 1800 2400 4800 9600 19200 38400 <code>exta</code> <code>extb</code>.  <code>exta</code> is the same as 19200; <code>extb</code> is the same as 38400.  0 hangs up the line if <code>-clocal</code> is set.</li>
</ul>


<h2>Color Terminals</h2>
<pre>color256 ()
{
    local L=$(sed &#039;s/[0-9]//g; s/./#/g&#039; &lt;&lt;&lt;`seq -s+0 $(($COLUMNS - 10))`);
    for i in `seq 0 $(tput colors)`;
    do printf " %.3d `tput setab $i`${L}${R} %.3d `tput setab 0;tput setaf 7`\n" $i $i | tr &#039;#&#039; &#039; &#039;;
    done
}</pre>

<pre>for F in `find ~/.terminfo/ -type f | sed &#039;s/^.*\///&#039; | xargs -P0 -I&#039;TT&#039; sh -c &#039;echo "$(tput -T TT colors): TT"&#039;|sed &#039;/^-/d&#039;| grep ^16:|cut -d: -f2`; do
echo -e "\n\n";
pm $F; export TERM=$F; tput -T $F initc; color256; done</pre>

<pre>find ~/.terminfo/ -type f | sed &#039;s/^.*\///&#039; | xargs -I&#039;TT&#039; sh -c &#039;echo "$(tput -T TT colors): TT"&#039;|sed &#039;/^-/d&#039;</pre>

<h3>Terminals with 16 Colors</h3>
<ul>
<li><var>aixterm-16color</var></li>
<li><var>amiga-vnc</var></li>
<li><var>hp2397</var></li>
<li><var>hp2397a</var></li>
<li><var>hp+color</var></li>
<li><var>ibm+16color</var></li>
<li><var>konsole-16color</var></li>
<li><var>nsterm-16color</var></li>
<li><var>nsterm-7-c</var></li>
<li><var>nsterm-7-c-s</var></li>
<li><var>nsterm-acs-c</var></li>
<li><var>nsterm-acs-c-s</var></li>
<li><var>nsterm-c</var></li>
<li><var>nsterm+c</var></li>
<li><var>nsterm-c-7</var></li>
<li><var>nsterm-c-acs</var></li>
<li><var>nsterm-c-s</var></li>
<li><var>nsterm-c-s-7</var></li>
<li><var>nsterm-c-s-acs</var></li>
<li><var>rxvt-16color</var></li>
<li><var>screen-16color</var></li>
<li><var>screen-16color-bce</var></li>
<li><var>screen-16color-bce-s</var></li>
<li><var>screen-16color-s</var></li>
<li><var>xterm-16color</var></li>
</ul>

<h3>Terminals with 52 Colors</h3>
<ul>
<li><var>d430c-dg-ccc</var></li>
<li><var>d430c-unix-25-ccc</var></li>
<li><var>d430c-unix-ccc</var></li>
<li><var>d430c-unix-s-ccc</var></li>
<li><var>d430c-unix-sr-ccc</var></li>
<li><var>d430c-unix-w-ccc</var></li>
<li><var>d430-dg-ccc</var></li>
<li><var>d430-unix-25-ccc</var></li>
<li><var>d430-unix-ccc</var></li>
<li><var>d430-unix-s-ccc</var></li>
<li><var>d430-unix-sr-ccc</var></li>
<li><var>d430-unix-w-ccc</var></li>
<li><var>dg+ccc</var></li>
<li><var>dgunix+ccc</var></li>
</ul>

<h3>Terminals with 64 Colors</h3>
<ul>
<li><var>hpterm-color</var></li>
<li><var>wy370</var></li>
<li><var>wy370-101k</var></li>
<li><var>wy370-105k</var></li>
<li><var>wy370-EPC</var></li>
<li><var>wy370-nk</var></li>
<li><var>wy370-rv</var></li>
<li><var>wy370-vb</var></li>
<li><var>wy370-w</var></li>
<li><var>wy370-wvb</var></li>
<li><var>wyse370</var></li>
<li><var>Eterm-88color</var></li>
<li><var>rxvt-88color</var></li>
<li><var>xterm-88color</var></li>
<li><var>xterm+88color</var></li>
</ul>

<h3>Terminals with 256 colors</h3>
<ul>
<li><var>Eterm-256color</var></li>
<li><var>gnome-256color</var></li>
<li><var>konsole-256color</var></li>
<li><var>putty-256color</var></li>
<li><var>rxvt-256color</var></li>
<li><var>screen-256color</var></li>
<li><var>screen-256color-bce</var></li>
<li><var>screen-256color-bce-s</var></li>
<li><var>screen-256color-s</var></li>
<li><var>xterm-256color</var></li>
<li><var>xterm+256color</var></li>
</ul>


<h3>View All tput capabilities</h3>
<p><a href="http://blogs.msdn.com/adioltean/articles/271063.aspx">http://blogs.msdn.com/adioltean/articles/271063.aspx</a></p>
<pre>function tputs(){ infocmp -1|sed &#039;s/^[   ]*//; /=/!d; s/=.*//g; /[#\|]/d&#039;; }</pre>

<p>Some  common  terminfo  parameter sequences, their termcap equivalents, and some terminal types which commonly have such sequences, are:</p>
<pre>terminfo                    termcap   Representative Terminals
---------------------------------------------------------------
%p1%c                       %.        adm
%p1%d                       %d        hp, ANSI standard, vt100
%p1%+%c                 %+x       concept
%i                          %iq       ANSI standard, vt100
%p1%?%&gt;%t%p1%+%;    %&gt;xy      concept
%p2 is printed before %p1   %r        hp</pre>



<h2>Installing your Own Terminfo</h2>
<p><a href="http://nion.modprobe.de/mostlike.txt">MostLike</a>, or if that is offline I uploaded a copy: <a href="http://uploads.askapache.com/2010/03/mostlike.txt">mostlike - manpages with color looking like most</a></p>
<pre>rm -rvf ~/.terminfo
mkdir -pv ~/.terminfo
curl -o terminfo.master http://nion.modprobe.de/mostlike.txt; curl -Ss ftp://invisible-island.net/ncurses/terminfo.src.gz
export TERMINFO=~/.terminfo;
sudo tic -e screen-256color,screen-256color-s,screen-256color-bce,screen-256color-bce-s,xterm+256color,xterm,xterm-pcolor terminfo.src</pre>


<h2>256 Colors in Terminal</h2>
<h3>256 Colors (Background)</h3>
<pre>W=`tput setaf 7` RC="\E[0;0;0m" L=$(sed &#039;s/[0-9]//g; s/./ /g&#039; &lt;&lt;&lt;`seq -s+0 $(($COLUMNS/2))`);
&nbsp;
for i in `seq 0 256`;
do
  printf "${W}\n%.3d `tput setab $i`${L}${RC}" $i;
done</pre>



<h3>256 Colors (Foreground)</h3>
<pre>W=`tput setaf 7` WB=`tput setab 0` RC="\E[0;0;0m" L=$(sed &#039;s/[0-9]//g; s/./#/g&#039; &lt;&lt;&lt;`seq -s+0 $(($COLUMNS/2))`);
for i in `seq 0 256`;
do
  printf "${WB}\n%.3d `tput setaf $i`${L}${RC}" $i;
done</pre>



<h2>Terminal Capabilities - Infocmp</h2>
<pre>infocmp -1Lq|grep -v "$TERM\|#"|tr -d &#039;  &#039;</pre>

<h3>DEC/ANSI special sequences</h3>
<p>List of the DEC/ANSI special sequences recognized:</p>
<table class="bordered">
<tbody>
<tr class="header">
<th>Action</th>
<th>Meaning</th>
</tr>
<tr><td><code>%%</code></td>
        <td>The percent sign</td></tr>
<tr class="odd"><td><code>%t</code></td>
        <td>The time the request was received in Universal Coordinated Time
        since the epoch (Jan. 1, 1970) measured in microseconds. The value
        is preceded by <code>t=</code>.</td></tr>
<tr><td><code>%D</code></td>
        <td>The time from when the request was received to the time the
        headers are sent on the wire. This is a measure of the duration
        of the request. The value is preceded by <code>D=</code>.
        The value is measured in microseconds.</td></tr>
<tr class="odd"><td><code>%{VARNAME}e</code></td>
        <td>The contents of the <a href="../env.html">environment
        variable</a> <code>VARNAME</code>.</td></tr>
<tr><td><code>%{VARNAME}s</code></td>
        <td>The contents of the <a href="mod_ssl.html#envvars">SSL environment
        variable</a> <code>VARNAME</code>, if <code class='module'>&lt;a href="../mod/mod_ssl.html"&gt;mod_ssl&lt;/a&gt;</code> is enabled.</td></tr>

-----------------------------------------
<tr><td><code>RIS         </code></td><td>full reset</td></tr>
<tr><td><code>SC          </code></td><td>save cursor</td></tr>
<tr><td><code>RC          </code></td><td>restore cursor</td></tr>
<tr><td><code>LL          </code></td><td>home-down</td></tr>
<tr><td><code>RSR         </code></td><td>reset scroll region</td></tr>
-----------------------------------------
<tr><td><code>DECSTR      </code></td><td>soft reset (VT320)</td></tr>
<tr><td><code>S7C1T       </code></td><td>7-bit controls (VT220)</td></tr>
-----------------------------------------
<tr><td><code>ISO DEC G0  </code></td><td>enable DEC graphics for G0</td></tr>
<tr><td><code>ISO UK G0   </code></td><td>enable UK chars for G0</td></tr>
<tr><td><code>ISO US G0   </code></td><td>enable US chars for G0</td></tr>
<tr><td><code>ISO DEC G1  </code></td><td>enable DEC graphics for G1</td></tr>
<tr><td><code>ISO UK G1   </code></td><td>enable UK chars for G1</td></tr>
<tr><td><code>ISO US G1   </code></td><td>enable US chars for G1</td></tr>
-----------------------------------------
<tr><td><code>DECPAM      </code></td><td>application keypad mode</td></tr>
<tr><td><code>DECPNM      </code></td><td>normal keypad mode</td></tr>
<tr><td><code>DECANSI     </code></td><td>enter ANSI mode</td></tr>
-----------------------------------------
<tr><td><code>ECMA[+-]AM  </code></td><td>keyboard action mode</td></tr>
<tr><td><code>ECMA[+-]IRM </code></td><td>insert replace mode</td></tr>
<tr><td><code>ECMA[+-]SRM </code></td><td>send receive mode</td></tr>
<tr><td><code>ECMA[+-]LNM </code></td><td>linefeed mode</td></tr>
-----------------------------------------
<tr><td><code>DEC[+-]CKM  </code></td><td>application cursor keys</td></tr>
<tr><td><code>DEC[+-]ANM  </code></td><td>set VT52 mode</td></tr>
<tr><td><code>DEC[+-]COLM </code></td><td>132-column mode</td></tr>
<tr><td><code>DEC[+-]SCLM </code></td><td>smooth scroll</td></tr>
<tr><td><code>DEC[+-]SCNM </code></td><td>reverse video mode</td></tr>
<tr><td><code>DEC[+-]OM   </code></td><td>origin mode</td></tr>
<tr><td><code>DEC[+-]AWM  </code></td><td>wraparound mode</td></tr>
<tr><td><code>DEC[+-]ARM  </code></td><td>auto-repeat mode</td></tr>
</tbody>
</table>




<table class="bordered"><tbody><tr class="header"><th>Name</th><th>Description</th></tr>
<tr><td><a id="acs_chars">acs_chars</a></td><td><code>``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~,</code></td></tr>
<tr><td><a id="back_tab">back_tab</a></td><td><code>\E[Z,</code></td></tr>
<tr><td><a id="bell">bell</a></td><td><code>^G,</code></td></tr>
<tr><td><a id="carriage_return">carriage_return</a></td><td><code>^M,</code></td></tr>
<tr><td><a id="change_scroll_region">change_scroll_region</a></td><td><code>\E[%i%p1%d;%p2%dr,</code></td></tr>
<tr><td><a id="clear_all_tabs">clear_all_tabs</a></td><td><code>\E[3g,</code></td></tr>
<tr><td><a id="clear_screen">clear_screen</a></td><td><code>\E[H\E[2J,</code></td></tr>
<tr><td><a id="clr_bol">clr_bol</a></td><td><code>\E[1K,</code></td></tr>
<tr><td><a id="clr_eol">clr_eol</a></td><td><code>\E[K,</code></td></tr>
<tr><td><a id="clr_eos">clr_eos</a></td><td><code>\E[J,</code></td></tr>
<tr><td><a id="column_address">column_address</a></td><td><code>\E[%i%p1%dG,</code></td></tr>
<tr><td><a id="cursor_address">cursor_address</a></td><td><code>\E[%i%p1%d;%p2%dH,</code></td></tr>
<tr><td><a id="cursor_down">cursor_down</a></td><td><code>^J,</code></td></tr>
<tr><td><a id="cursor_home">cursor_home</a></td><td><code>\E[H,</code></td></tr>
<tr><td><a id="cursor_invisible">cursor_invisible</a></td><td><code>\E[?25l,</code></td></tr>
<tr><td><a id="cursor_left">cursor_left</a></td><td><code>^H,</code></td></tr>
<tr><td><a id="cursor_normal">cursor_normal</a></td><td><code>\E[?12l\E[?25h,</code></td></tr>
<tr><td><a id="cursor_right">cursor_right</a></td><td><code>\E[C,</code></td></tr>
<tr><td><a id="cursor_up">cursor_up</a></td><td><code>\E[A,</code></td></tr>
<tr><td><a id="cursor_visible">cursor_visible</a></td><td><code>\E[?12;25h,</code></td></tr>
<tr><td><a id="delete_character">delete_character</a></td><td><code>\E[P,</code></td></tr>
<tr><td><a id="delete_line">delete_line</a></td><td><code>\E[M,</code></td></tr>
<tr><td><a id="enter_alt_charset_mode">enter_alt_charset_mode</a></td><td><code>\E(0,</code></td></tr>
<tr><td><a id="enter_am_mode">enter_am_mode</a></td><td><code>\E[?7h,</code></td></tr>
<tr><td><a id="enter_blink_mode">enter_blink_mode</a></td><td><code>\E[5m,</code></td></tr>
<tr><td><a id="enter_bold_mode">enter_bold_mode</a></td><td><code>\E[1m,</code></td></tr>
<tr><td><a id="enter_ca_mode">enter_ca_mode</a></td><td><code>\E[?1049h,</code></td></tr>
<tr><td><a id="enter_insert_mode">enter_insert_mode</a></td><td><code>\E[4h,</code></td></tr>
<tr><td><a id="enter_reverse_mode">enter_reverse_mode</a></td><td><code>\E[7m,</code></td></tr>
<tr><td><a id="enter_secure_mode">enter_secure_mode</a></td><td><code>\E[8m,</code></td></tr>
<tr><td><a id="enter_standout_mode">enter_standout_mode</a></td><td><code>\E[7m,</code></td></tr>
<tr><td><a id="enter_underline_mode">enter_underline_mode</a></td><td><code>\E[4m,</code></td></tr>
<tr><td><a id="erase_chars">erase_chars</a></td><td><code>\E[%p1%dX,</code></td></tr>
<tr><td><a id="exit_alt_charset_mode">exit_alt_charset_mode</a></td><td><code>\E(B,</code></td></tr>
<tr><td><a id="exit_am_mode">exit_am_mode</a></td><td><code>\E[?7l,</code></td></tr>
<tr><td><a id="exit_attribute_mode">exit_attribute_mode</a></td><td><code>\E(B\E[m,</code></td></tr>
<tr><td><a id="exit_ca_mode">exit_ca_mode</a></td><td><code>\E[?1049l,</code></td></tr>
<tr><td><a id="exit_insert_mode">exit_insert_mode</a></td><td><code>\E[4l,</code></td></tr>
<tr><td><a id="exit_standout_mode">exit_standout_mode</a></td><td><code>\E[27m,</code></td></tr>
<tr><td><a id="exit_underline_mode">exit_underline_mode</a></td><td><code>\E[24m,</code></td></tr>
<tr><td><a id="flash_screen">flash_screen</a></td><td><code>\E[?5h$&lt;100/&gt;\E[?5l,</code></td></tr>
<tr><td><a id="init_2string">init_2string</a></td><td><code>\E[\041p\E[?3;4l\E[4l\E&gt;,</code></td></tr>
<tr><td><a id="initialize_color">initialize_color</a></td><td><code>\E]4;%p1%d;rgb\072%p2%{255}%*%{1000}%/%2.2X/%p3%{255}%*%{1000}%/%2.2X/%p4%{255}%*%{1000}%/%2.2X\E\,</code></td></tr>
<tr><td><a id="insert_line">insert_line</a></td><td><code>\E[L,</code></td></tr>
<tr><td><a id="key_b2">key_b2</a></td><td><code>\EOE,</code></td></tr>
<tr><td><a id="key_backspace">key_backspace</a></td><td><code>\177,</code></td></tr>
<tr><td><a id="key_btab">key_btab</a></td><td><code>\E[Z,</code></td></tr>
<tr><td><a id="key_dc">key_dc</a></td><td><code>\E[3~,</code></td></tr>
<tr><td><a id="key_down">key_down</a></td><td><code>\EOB,</code></td></tr>
<tr><td><a id="key_end">key_end</a></td><td><code>\EOF,</code></td></tr>
<tr><td><a id="key_enter">key_enter</a></td><td><code>\EOM,</code></td></tr>
<tr><td><a id="key_f1">key_f1</a></td><td><code>\EOP,</code></td></tr>
<tr><td><a id="key_f10">key_f10</a></td><td><code>\E[21~,</code></td></tr>
<tr><td><a id="key_f11">key_f11</a></td><td><code>\E[23~,</code></td></tr>
<tr><td><a id="key_f12">key_f12</a></td><td><code>\E[24~,</code></td></tr>
<tr><td><a id="key_f13">key_f13</a></td><td><code>\EO2P,</code></td></tr>
<tr><td><a id="key_f14">key_f14</a></td><td><code>\EO2Q,</code></td></tr>
<tr><td><a id="key_f15">key_f15</a></td><td><code>\EO2R,</code></td></tr>
<tr><td><a id="key_f16">key_f16</a></td><td><code>\EO2S,</code></td></tr>
<tr><td><a id="key_f17">key_f17</a></td><td><code>\E[15;2~,</code></td></tr>
<tr><td><a id="key_f18">key_f18</a></td><td><code>\E[17;2~,</code></td></tr>
<tr><td><a id="key_f19">key_f19</a></td><td><code>\E[18;2~,</code></td></tr>
<tr><td><a id="key_f2">key_f2</a></td><td><code>\EOQ,</code></td></tr>
<tr><td><a id="key_f20">key_f20</a></td><td><code>\E[19;2~,</code></td></tr>
<tr><td><a id="key_f21">key_f21</a></td><td><code>\E[20;2~,</code></td></tr>
<tr><td><a id="key_f22">key_f22</a></td><td><code>\E[21;2~,</code></td></tr>
<tr><td><a id="key_f23">key_f23</a></td><td><code>\E[23;2~,</code></td></tr>
<tr><td><a id="key_f24">key_f24</a></td><td><code>\E[24;2~,</code></td></tr>
<tr><td><a id="key_f25">key_f25</a></td><td><code>\EO5P,</code></td></tr>
<tr><td><a id="key_f26">key_f26</a></td><td><code>\EO5Q,</code></td></tr>
<tr><td><a id="key_f27">key_f27</a></td><td><code>\EO5R,</code></td></tr>
<tr><td><a id="key_f28">key_f28</a></td><td><code>\EO5S,</code></td></tr>
<tr><td><a id="key_f29">key_f29</a></td><td><code>\E[15;5~,</code></td></tr>
<tr><td><a id="key_f3">key_f3</a></td><td><code>\EOR,</code></td></tr>
<tr><td><a id="key_f30">key_f30</a></td><td><code>\E[17;5~,</code></td></tr>
<tr><td><a id="key_f31">key_f31</a></td><td><code>\E[18;5~,</code></td></tr>
<tr><td><a id="key_f32">key_f32</a></td><td><code>\E[19;5~,</code></td></tr>
<tr><td><a id="key_f33">key_f33</a></td><td><code>\E[20;5~,</code></td></tr>
<tr><td><a id="key_f34">key_f34</a></td><td><code>\E[21;5~,</code></td></tr>
<tr><td><a id="key_f35">key_f35</a></td><td><code>\E[23;5~,</code></td></tr>
<tr><td><a id="key_f36">key_f36</a></td><td><code>\E[24;5~,</code></td></tr>
<tr><td><a id="key_f37">key_f37</a></td><td><code>\EO6P,</code></td></tr>
<tr><td><a id="key_f38">key_f38</a></td><td><code>\EO6Q,</code></td></tr>
<tr><td><a id="key_f39">key_f39</a></td><td><code>\EO6R,</code></td></tr>
<tr><td><a id="key_f4">key_f4</a></td><td><code>\EOS,</code></td></tr>
<tr><td><a id="key_f40">key_f40</a></td><td><code>\EO6S,</code></td></tr>
<tr><td><a id="key_f41">key_f41</a></td><td><code>\E[15;6~,</code></td></tr>
<tr><td><a id="key_f42">key_f42</a></td><td><code>\E[17;6~,</code></td></tr>
<tr><td><a id="key_f43">key_f43</a></td><td><code>\E[18;6~,</code></td></tr>
<tr><td><a id="key_f44">key_f44</a></td><td><code>\E[19;6~,</code></td></tr>
<tr><td><a id="key_f45">key_f45</a></td><td><code>\E[20;6~,</code></td></tr>
<tr><td><a id="key_f46">key_f46</a></td><td><code>\E[21;6~,</code></td></tr>
<tr><td><a id="key_f47">key_f47</a></td><td><code>\E[23;6~,</code></td></tr>
<tr><td><a id="key_f48">key_f48</a></td><td><code>\E[24;6~,</code></td></tr>
<tr><td><a id="key_f49">key_f49</a></td><td><code>\EO3P,</code></td></tr>
<tr><td><a id="key_f5">key_f5</a></td><td><code>\E[15~,</code></td></tr>
<tr><td><a id="key_f50">key_f50</a></td><td><code>\EO3Q,</code></td></tr>
<tr><td><a id="key_f51">key_f51</a></td><td><code>\EO3R,</code></td></tr>
<tr><td><a id="key_f52">key_f52</a></td><td><code>\EO3S,</code></td></tr>
<tr><td><a id="key_f53">key_f53</a></td><td><code>\E[15;3~,</code></td></tr>
<tr><td><a id="key_f54">key_f54</a></td><td><code>\E[17;3~,</code></td></tr>
<tr><td><a id="key_f55">key_f55</a></td><td><code>\E[18;3~,</code></td></tr>
<tr><td><a id="key_f56">key_f56</a></td><td><code>\E[19;3~,</code></td></tr>
<tr><td><a id="key_f57">key_f57</a></td><td><code>\E[20;3~,</code></td></tr>
<tr><td><a id="key_f58">key_f58</a></td><td><code>\E[21;3~,</code></td></tr>
<tr><td><a id="key_f59">key_f59</a></td><td><code>\E[23;3~,</code></td></tr>
<tr><td><a id="key_f6">key_f6</a></td><td><code>\E[17~,</code></td></tr>
<tr><td><a id="key_f60">key_f60</a></td><td><code>\E[24;3~,</code></td></tr>
<tr><td><a id="key_f61">key_f61</a></td><td><code>\EO4P,</code></td></tr>
<tr><td><a id="key_f62">key_f62</a></td><td><code>\EO4Q,</code></td></tr>
<tr><td><a id="key_f63">key_f63</a></td><td><code>\EO4R,</code></td></tr>
<tr><td><a id="key_f7">key_f7</a></td><td><code>\E[18~,</code></td></tr>
<tr><td><a id="key_f8">key_f8</a></td><td><code>\E[19~,</code></td></tr>
<tr><td><a id="key_f9">key_f9</a></td><td><code>\E[20~,</code></td></tr>
<tr><td><a id="key_home">key_home</a></td><td><code>\EOH,</code></td></tr>
<tr><td><a id="key_ic">key_ic</a></td><td><code>\E[2~,</code></td></tr>
<tr><td><a id="key_left">key_left</a></td><td><code>\EOD,</code></td></tr>
<tr><td><a id="key_mouse">key_mouse</a></td><td><code>\E[M,</code></td></tr>
<tr><td><a id="key_npage">key_npage</a></td><td><code>\E[6~,</code></td></tr>
<tr><td><a id="key_ppage">key_ppage</a></td><td><code>\E[5~,</code></td></tr>
<tr><td><a id="key_right">key_right</a></td><td><code>\EOC,</code></td></tr>
<tr><td><a id="key_sdc">key_sdc</a></td><td><code>\E[3;2~,</code></td></tr>
<tr><td><a id="key_send">key_send</a></td><td><code>\E[1;2F,</code></td></tr>
<tr><td><a id="key_sf">key_sf</a></td><td><code>\E[1;2B,</code></td></tr>
<tr><td><a id="key_shome">key_shome</a></td><td><code>\E[1;2H,</code></td></tr>
<tr><td><a id="key_sic">key_sic</a></td><td><code>\E[2;2~,</code></td></tr>
<tr><td><a id="key_sleft">key_sleft</a></td><td><code>\E[1;2D,</code></td></tr>
<tr><td><a id="key_snext">key_snext</a></td><td><code>\E[6;2~,</code></td></tr>
<tr><td><a id="key_sprevious">key_sprevious</a></td><td><code>\E[5;2~,</code></td></tr>
<tr><td><a id="key_sr">key_sr</a></td><td><code>\E[1;2A,</code></td></tr>
<tr><td><a id="key_sright">key_sright</a></td><td><code>\E[1;2C,</code></td></tr>
<tr><td><a id="key_up">key_up</a></td><td><code>\EOA,</code></td></tr>
<tr><td><a id="keypad_local">keypad_local</a></td><td><code>\E[?1l\E&gt;,</code></td></tr>
<tr><td><a id="keypad_xmit">\E[?1h\E</a></td><td><code>,</code></td></tr>
<tr><td><a id="memory_lock">memory_lock</a></td><td><code>\El,</code></td></tr>
<tr><td><a id="memory_unlock">memory_unlock</a></td><td><code>\Em,</code></td></tr>
<tr><td><a id="orig_pair">orig_pair</a></td><td><code>\E[39;49m,</code></td></tr>
<tr><td><a id="parm_dch">parm_dch</a></td><td><code>\E[%p1%dP,</code></td></tr>
<tr><td><a id="parm_delete_line">parm_delete_line</a></td><td><code>\E[%p1%dM,</code></td></tr>
<tr><td><a id="parm_down_cursor">parm_down_cursor</a></td><td><code>\E[%p1%dB,</code></td></tr>
<tr><td><a id="parm_ich">parm_ich</a></td><td><code>\E[%p1%d@,</code></td></tr>
<tr><td><a id="parm_index">parm_index</a></td><td><code>\E[%p1%dS,</code></td></tr>
<tr><td><a id="parm_insert_line">parm_insert_line</a></td><td><code>\E[%p1%dL,</code></td></tr>
<tr><td><a id="parm_left_cursor">parm_left_cursor</a></td><td><code>\E[%p1%dD,</code></td></tr>
<tr><td><a id="parm_right_cursor">parm_right_cursor</a></td><td><code>\E[%p1%dC,</code></td></tr>
<tr><td><a id="parm_rindex">parm_rindex</a></td><td><code>\E[%p1%dT,</code></td></tr>
<tr><td><a id="parm_up_cursor">parm_up_cursor</a></td><td><code>\E[%p1%dA,</code></td></tr>
<tr><td><a id="print_screen">print_screen</a></td><td><code>\E[i,</code></td></tr>
<tr><td><a id="prtr_off">prtr_off</a></td><td><code>\E[4i,</code></td></tr>
<tr><td><a id="prtr_on">prtr_on</a></td><td><code>\E[5i,</code></td></tr>
<tr><td><a id="reset_1string">reset_1string</a></td><td><code>\Ec,</code></td></tr>
<tr><td><a id="reset_2string">reset_2string</a></td><td><code>\E[\041p\E[?3;4l\E[4l\E&gt;,</code></td></tr>
<tr><td><a id="restore_cursor">restore_cursor</a></td><td><code>\E8,</code></td></tr>
<tr><td><a id="row_address">row_address</a></td><td><code>\E[%i%p1%dd,</code></td></tr>
<tr><td><a id="save_cursor">save_cursor</a></td><td><code>\E7,</code></td></tr>
<tr><td><a id="scroll_forward">scroll_forward</a></td><td><code>^J,</code></td></tr>
<tr><td><a id="scroll_reverse">scroll_reverse</a></td><td><code>\EM,</code></td></tr>
<tr><td><a id="set_a_background">set_a_background</a></td><td><code>\E[%?%p1%{8}%</code></td></tr>
</tbody></table>




<h2>Term Sorted</h2>
<pre>./MKtermsort.sh |sed &#039;s/.*\/\*  \(.*\)  \*\//\1/g&#039;|sort -u|grep ^[a-zA-Z]|sortwc|grep -v ^static|sort -d|tr " " &#039;,&#039;|sed &#039;s/\([^,]\{1,\}\),/&lt;var&gt;\1&lt;\/var&gt;,/g&#039;</pre>
<p><var>AB</var>,<var>ac</var>,<var>acs_btee</var>,<var>acsc</var>,<var>acs_chars</var>,<var>acs_hline</var>,<var>acs_llcorner</var>,<var>acs_lrcorner</var>,<var>acs_ltee</var>,<var>acs_plus</var>,<var>acs_rtee</var>,<var>acs_ttee</var>,<var>acs_ulcorner</var>,<var>acs_urcorner</var>,<var>acs_vline</var>,<var>ae</var>,<var>AF</var>,<var>al</var>,<var>AL</var>,<var>alt_scancode_esc</var>,<var>am</var>,<var>apstr</var>,<var>arrow_key_map</var>,<var>as</var>,<var>auto_left_margin</var>,<var>auto_right_margin</var>,<var>back_color_erase</var>,<var>backspace_delay</var>,<var>backspace_if_not_bs</var>,<var>backspaces_with_bs</var>,<var>back_tab</var>,<var>batt1</var>,<var>batt2</var>,<var>bc</var>,<var>bce</var>,<var>bel</var>,<var>bell</var>,<var>bicr</var>,<var>binel</var>,<var>birep</var>,<var>bit_image_carriage_return</var>,<var>bit_image_entwining</var>,<var>bit_image_newline</var>,<var>bit_image_repeat</var>,<var>bit_image_type</var>,<var>bitwin</var>,<var>bitype</var>,<var>bl</var>,<var>blink</var>,<var>bold</var>,<var>box1</var>,<var>box2</var>,<var>box_chars_1</var>,<var>bs</var>,<var>bt</var>,<var>BT</var>,<var>btml</var>,<var>btns</var>,<var>buffer_capacity</var>,<var>bufsz</var>,<var>buttons</var>,<var>bw</var>,<var>bx</var>,<var>can_change</var>,<var>carriage_return</var>,<var>carriage_return_delay</var>,<var>cb</var>,<var>cbt</var>,<var>cc</var>,<var>CC</var>,<var>ccc</var>,<var>cd</var>,<var>ce</var>,<var>ceol_standout_glitch</var>,<var>ch</var>,<var>change_char_pitch</var>,<var>change_line_pitch</var>,<var>change_res_horz</var>,<var>change_res_vert</var>,<var>change_scroll_region</var>,<var>char_padding</var>,<var>char_set_names</var>,<var>chr</var>,<var>chts</var>,<var>ci</var>,<var>civis</var>,<var>cl</var>,<var>clear</var>,<var>clear_all_tabs</var>,<var>clear_margins</var>,<var>clear_screen</var>,<var>clr_bol</var>,<var>clr_eol</var>,<var>clr_eos</var>,<var>cm</var>,<var>CM</var>,<var>cmdch</var>,<var>cnorm</var>,<var>co</var>,<var>Co</var>,<var>code_set_init</var>,<var>col_addr_glitch</var>,<var>colb0</var>,<var>colb1</var>,<var>colb2</var>,<var>colb3</var>,<var>colb4</var>,<var>colb5</var>,<var>colb6</var>,<var>colb7</var>,<var>colf0</var>,<var>colf1</var>,<var>colf2</var>,<var>colf3</var>,<var>colf4</var>,<var>colf5</var>,<var>colf6</var>,<var>colf7</var>,<var>color_names</var>,<var>colornm</var>,<var>colors</var>,<var>cols</var>,<var>column_address</var>,<var>columns</var>,<var>command_character</var>,<var>cpi</var>,<var>cpi_changes_res</var>,<var>cpix</var>,<var>cps</var>,<var>cr</var>,<var>cr_cancels_micro_mode</var>,<var>create_window</var>,<var>crt_no_scrolling</var>,<var>crxm</var>,<var>cs</var>,<var>csin</var>,<var>csnm</var>,<var>csr</var>,<var>ct</var>,<var>cub</var>,<var>cub1</var>,<var>cud</var>,<var>cud1</var>,<var>cuf</var>,<var>cuf1</var>,<var>cup</var>,<var>cursor_address</var>,<var>cursor_down</var>,<var>cursor_home</var>,<var>cursor_invisible</var>,<var>cursor_left</var>,<var>cursor_mem_address</var>,<var>cursor_normal</var>,<var>cursor_right</var>,<var>cursor_to_ll</var>,<var>cursor_up</var>,<var>cursor_visible</var>,<var>cuu</var>,<var>cuu1</var>,<var>cv</var>,<var>cvr</var>,<var>cvvis</var>,<var>CW</var>,<var>cwin</var>,<var>da</var>,<var>daisy</var>,<var>db</var>,<var>dB</var>,<var>dc</var>,<var>dC</var>,<var>DC</var>,<var>dch</var>,<var>dch1</var>,<var>dclk</var>,<var>defbi</var>,<var>defc</var>,<var>define_bit_image_region</var>,<var>define_char</var>,<var>delete_character</var>,<var>delete_line</var>,<var>dest_tabs_magic_smso</var>,<var>device_type</var>,<var>devt</var>,<var>DI</var>,<var>dial</var>,<var>dial_phone</var>,<var>dim</var>,<var>dispc</var>,<var>display_clock</var>,<var>display_pc_char</var>,<var>dis_status_line</var>,<var>DK</var>,<var>dl</var>,<var>DL</var>,<var>dl1</var>,<var>dm</var>,<var>dN</var>,<var>do</var>,<var>DO</var>,<var>docr</var>,<var>dot_horz_spacing</var>,<var>dot_vert_spacing</var>,<var>down_half_line</var>,<var>ds</var>,<var>dsl</var>,<var>dT</var>,<var>dv</var>,<var>eA</var>,<var>eat_newline_glitch</var>,<var>ec</var>,<var>ech</var>,<var>ed</var>,<var>ehhlm</var>,<var>ei</var>,<var>el</var>,<var>el1</var>,<var>elhlm</var>,<var>elohlm</var>,<var>ena_acs</var>,<var>enacs</var>,<var>endbi</var>,<var>end_bit_image_region</var>,<var>enter_alt_charset_mode</var>,<var>enter_am_mode</var>,<var>enter_blink_mode</var>,<var>enter_bold_mode</var>,<var>enter_ca_mode</var>,<var>enter_delete_mode</var>,<var>enter_dim_mode</var>,<var>enter_doublewide_mode</var>,<var>enter_draft_quality</var>,<var>enter_horizontal_hl_mode</var>,<var>enter_insert_mode</var>,<var>enter_italics_mode</var>,<var>enter_left_hl_mode</var>,<var>enter_leftward_mode</var>,<var>enter_low_hl_mode</var>,<var>enter_micro_mode</var>,<var>enter_near_letter_quality</var>,<var>enter_normal_quality</var>,<var>enter_pc_charset_mode</var>,<var>enter_protected_mode</var>,<var>enter_reverse_mode</var>,<var>enter_right_hl_mode</var>,<var>enter_scancode_mode</var>,<var>enter_secure_mode</var>,<var>enter_shadow_mode</var>,<var>enter_standout_mode</var>,<var>enter_subscript_mode</var>,<var>enter_superscript_mode</var>,<var>enter_top_hl_mode</var>,<var>enter_underline_mode</var>,<var>enter_upward_mode</var>,<var>enter_vertical_hl_mode</var>,<var>enter_xon_mode</var>,<var>eo</var>,<var>erase_chars</var>,<var>erase_overstrike</var>,<var>erhlm</var>,<var>es</var>,<var>eslok</var>,<var>ethlm</var>,<var>evhlm</var>,<var>exit_alt_charset_mode</var>,<var>exit_am_mode</var>,<var>exit_attribute_mode</var>,<var>exit_ca_mode</var>,<var>exit_delete_mode</var>,<var>exit_doublewide_mode</var>,<var>exit_insert_mode</var>,<var>exit_italics_mode</var>,<var>exit_leftward_mode</var>,<var>exit_micro_mode</var>,<var>exit_pc_charset_mode</var>,<var>exit_scancode_mode</var>,<var>exit_shadow_mode</var>,<var>exit_standout_mode</var>,<var>exit_subscript_mode</var>,<var>exit_superscript_mode</var>,<var>exit_underline_mode</var>,<var>exit_upward_mode</var>,<var>exit_xon_mode</var>,<var>F1</var>,<var>F2</var>,<var>F3</var>,<var>F4</var>,<var>F5</var>,<var>F6</var>,<var>F7</var>,<var>F8</var>,<var>F9</var>,<var>Fa</var>,<var>FA</var>,<var>Fb</var>,<var>FB</var>,<var>Fc</var>,<var>FC</var>,<var>Fd</var>,<var>FD</var>,<var>Fe</var>,<var>FE</var>,<var>ff</var>,<var>Ff</var>,<var>FF</var>,<var>Fg</var>,<var>FG</var>,<var>fh</var>,<var>Fh</var>,<var>FH</var>,<var>Fi</var>,<var>FI</var>,<var>fixed_pause</var>,<var>Fj</var>,<var>FJ</var>,<var>Fk</var>,<var>FK</var>,<var>Fl</var>,<var>FL</var>,<var>flash</var>,<var>flash_hook</var>,<var>flash_screen</var>,<var>fln</var>,<var>Fm</var>,<var>FM</var>,<var>Fn</var>,<var>FN</var>,<var>Fo</var>,<var>FO</var>,<var>font0</var>,<var>font1</var>,<var>font2</var>,<var>font3</var>,<var>font4</var>,<var>font5</var>,<var>font6</var>,<var>font7</var>,<var>form_feed</var>,<var>Fp</var>,<var>FP</var>,<var>Fq</var>,<var>FQ</var>,<var>Fr</var>,<var>FR</var>,<var>from_status_line</var>,<var>fs</var>,<var>FS</var>,<var>fsl</var>,<var>FT</var>,<var>FU</var>,<var>FV</var>,<var>FW</var>,<var>FX</var>,<var>FY</var>,<var>FZ</var>,<var>G1</var>,<var>G2</var>,<var>G3</var>,<var>G4</var>,<var>GC</var>,<var>GD</var>,<var>generic_type</var>,<var>getm</var>,<var>get_mouse</var>,<var>GH</var>,<var>GL</var>,<var>Gm</var>,<var>gn</var>,<var>gnu_has_meta_key</var>,<var>goto_window</var>,<var>GR</var>,<var>GU</var>,<var>GV</var>,<var>hangup</var>,<var>hard_copy</var>,<var>hard_cursor</var>,<var>has_hardware_tabs</var>,<var>has_meta_key</var>,<var>has_print_wheel</var>,<var>has_status_line</var>,<var>hc</var>,<var>HC</var>,<var>hd</var>,<var>hl</var>,<var>hls</var>,<var>ho</var>,<var>home</var>,<var>hook</var>,<var>horizontal_tab_delay</var>,<var>hpa</var>,<var>hs</var>,<var>ht</var>,<var>hts</var>,<var>hu</var>,<var>HU</var>,<var>hue_lightness_saturation</var>,<var>hup</var>,<var>hz</var>,<var>i1</var>,<var>i2</var>,<var>i3</var>,<var>ic</var>,<var>Ic</var>,<var>IC</var>,<var>ich</var>,<var>ich1</var>,<var>if</var>,<var>il</var>,<var>il1</var>,<var>im</var>,<var>in</var>,<var>ind</var>,<var>indn</var>,<var>init_1string</var>,<var>init_2string</var>,<var>init_3string</var>,<var>initc</var>,<var>init_file</var>,<var>initialize_color</var>,<var>initial
ize_pair</var>,<var>initp</var>,<var>init_prog</var>,<var>init_tabs</var>,<var>insert_character</var>,<var>insert_line</var>,<var>insert_null_glitch</var>,<var>insert_padding</var>,<var>invis</var>,<var>ip</var>,<var>iP</var>,<var>Ip</var>,<var>iprog</var>,<var>is</var>,<var>is1</var>,<var>is2</var>,<var>is3</var>,<var>it</var>,<var>k;</var>,<var>k0</var>,<var>k1</var>,<var>K1</var>,<var>k2</var>,<var>K2</var>,<var>k3</var>,<var>K3</var>,<var>k4</var>,<var>K4</var>,<var>k5</var>,<var>K5</var>,<var>k6</var>,<var>k7</var>,<var>k8</var>,<var>k9</var>,<var>ka</var>,<var>kA</var>,<var>ka1</var>,<var>ka3</var>,<var>kact</var>,<var>kb</var>,<var>kB</var>,<var>kb2</var>,<var>kbeg</var>,<var>kBEG</var>,<var>kbs</var>,<var>kbtab</var>,<var>kC</var>,<var>kc1</var>,<var>kc3</var>,<var>kcan</var>,<var>kCAN</var>,<var>kcbt</var>,<var>kclo</var>,<var>kclr</var>,<var>kcmd</var>,<var>kCMD</var>,<var>kcpn</var>,<var>kcpy</var>,<var>kCPY</var>,<var>kcrt</var>,<var>kCRT</var>,<var>kctab</var>,<var>kcub1</var>,<var>kcud1</var>,<var>kcuf1</var>,<var>kcuu1</var>,<var>kd</var>,<var>kD</var>,<var>kDC</var>,<var>kdch1</var>,<var>kDL</var>,<var>kdl1</var>,<var>kdo</var>,<var>ke</var>,<var>kE</var>,<var>ked</var>,<var>kel</var>,<var>kend</var>,<var>kEND</var>,<var>kent</var>,<var>kEOL</var>,<var>kext</var>,<var>kEXT</var>,<var>key_a1</var>,<var>key_a3</var>,<var>key_b2</var>,<var>key_backspace</var>,<var>key_beg</var>,<var>key_btab</var>,<var>key_c1</var>,<var>key_c3</var>,<var>key_cancel</var>,<var>key_catab</var>,<var>key_clear</var>,<var>key_close</var>,<var>key_command</var>,<var>key_copy</var>,<var>key_create</var>,<var>key_ctab</var>,<var>key_dc</var>,<var>key_dl</var>,<var>key_down</var>,<var>key_eic</var>,<var>key_end</var>,<var>key_enter</var>,<var>key_eol</var>,<var>key_eos</var>,<var>key_exit</var>,<var>key_f0</var>,<var>key_f1</var>,<var>key_f10</var>,<var>key_f11</var>,<var>key_f12</var>,<var>key_f13</var>,<var>key_f14</var>,<var>key_f15</var>,<var>key_f16</var>,<var>key_f17</var>,<var>key_f18</var>,<var>key_f19</var>,<var>key_f2</var>,<var>key_f20</var>,<var>key_f21</var>,<var>key_f22</var>,<var>key_f23</var>,<var>key_f24</var>,<var>key_f25</var>,<var>key_f26</var>,<var>key_f27</var>,<var>key_f28</var>,<var>key_f29</var>,<var>key_f3</var>,<var>key_f30</var>,<var>key_f31</var>,<var>key_f32</var>,<var>key_f33</var>,<var>key_f34</var>,<var>key_f35</var>,<var>key_f36</var>,<var>key_f37</var>,<var>key_f38</var>,<var>key_f39</var>,<var>key_f4</var>,<var>key_f40</var>,<var>key_f41</var>,<var>key_f42</var>,<var>key_f43</var>,<var>key_f44</var>,<var>key_f45</var>,<var>key_f46</var>,<var>key_f47</var>,<var>key_f48</var>,<var>key_f49</var>,<var>key_f5</var>,<var>key_f50</var>,<var>key_f51</var>,<var>key_f52</var>,<var>key_f53</var>,<var>key_f54</var>,<var>key_f55</var>,<var>key_f56</var>,<var>key_f57</var>,<var>key_f58</var>,<var>key_f59</var>,<var>key_f6</var>,<var>key_f60</var>,<var>key_f61</var>,<var>key_f62</var>,<var>key_f63</var>,<var>key_f7</var>,<var>key_f8</var>,<var>key_f9</var>,<var>key_find</var>,<var>key_help</var>,<var>key_home</var>,<var>key_ic</var>,<var>key_il</var>,<var>key_left</var>,<var>key_ll</var>,<var>key_mark</var>,<var>key_message</var>,<var>key_mouse</var>,<var>key_move</var>,<var>key_next</var>,<var>key_npage</var>,<var>key_open</var>,<var>key_options</var>,<var>keypad_local</var>,<var>keypad_xmit</var>,<var>key_ppage</var>,<var>key_previous</var>,<var>key_print</var>,<var>key_redo</var>,<var>key_reference</var>,<var>key_refresh</var>,<var>key_replace</var>,<var>key_restart</var>,<var>key_resume</var>,<var>key_right</var>,<var>key_save</var>,<var>key_sbeg</var>,<var>key_scancel</var>,<var>key_scommand</var>,<var>key_scopy</var>,<var>key_screate</var>,<var>key_sdc</var>,<var>key_sdl</var>,<var>key_select</var>,<var>key_send</var>,<var>key_seol</var>,<var>key_sexit</var>,<var>key_sf</var>,<var>key_sfind</var>,<var>key_shelp</var>,<var>key_shome</var>,<var>key_sic</var>,<var>key_sleft</var>,<var>key_smessage</var>,<var>key_smove</var>,<var>key_snext</var>,<var>key_soptions</var>,<var>key_sprevious</var>,<var>key_sprint</var>,<var>key_sr</var>,<var>key_sredo</var>,<var>key_sreplace</var>,<var>key_sright</var>,<var>key_srsume</var>,<var>key_ssave</var>,<var>key_ssuspend</var>,<var>key_stab</var>,<var>key_sundo</var>,<var>key_suspend</var>,<var>key_undo</var>,<var>key_up</var>,<var>kF</var>,<var>kf0</var>,<var>kf1</var>,<var>kf10</var>,<var>kf11</var>,<var>kf12</var>,<var>kf13</var>,<var>kf14</var>,<var>kf15</var>,<var>kf16</var>,<var>kf17</var>,<var>kf18</var>,<var>kf19</var>,<var>kf2</var>,<var>kf20</var>,<var>kf21</var>,<var>kf22</var>,<var>kf23</var>,<var>kf24</var>,<var>kf25</var>,<var>kf26</var>,<var>kf27</var>,<var>kf28</var>,<var>kf29</var>,<var>kf3</var>,<var>kf30</var>,<var>kf31</var>,<var>kf32</var>,<var>kf33</var>,<var>kf34</var>,<var>kf35</var>,<var>kf36</var>,<var>kf37</var>,<var>kf38</var>,<var>kf39</var>,<var>kf4</var>,<var>kf40</var>,<var>kf41</var>,<var>kf42</var>,<var>kf43</var>,<var>kf44</var>,<var>kf45</var>,<var>kf46</var>,<var>kf47</var>,<var>kf48</var>,<var>kf49</var>,<var>kf5</var>,<var>kf50</var>,<var>kf51</var>,<var>kf52</var>,<var>kf53</var>,<var>kf54</var>,<var>kf55</var>,<var>kf56</var>,<var>kf57</var>,<var>kf58</var>,<var>kf59</var>,<var>kf6</var>,<var>kf60</var>,<var>kf61</var>,<var>kf62</var>,<var>kf63</var>,<var>kf7</var>,<var>kf8</var>,<var>kf9</var>,<var>kfnd</var>,<var>kFND</var>,<var>kh</var>,<var>kH</var>,<var>khlp</var>,<var>kHLP</var>,<var>kHOM</var>,<var>khome</var>,<var>khts</var>,<var>kI</var>,<var>kIC</var>,<var>kich1</var>,<var>kil1</var>,<var>kind</var>,<var>kl</var>,<var>kL</var>,<var>kLFT</var>,<var>kll</var>,<var>km</var>,<var>kM</var>,<var>Km</var>,<var>kmous</var>,<var>kmov</var>,<var>kMOV</var>,<var>kmpf1</var>,<var>kmpf2</var>,<var>kmpf3</var>,<var>kmpf4</var>,<var>kmpf5</var>,<var>kmpf6</var>,<var>kmpf7</var>,<var>kmpf8</var>,<var>kmpf9</var>,<var>kmpt1</var>,<var>kmpt2</var>,<var>kmpt3</var>,<var>kmpt4</var>,<var>kmpt5</var>,<var>kmpt6</var>,<var>kmpt7</var>,<var>kmpt8</var>,<var>kmpt9</var>,<var>kmrk</var>,<var>kmsg</var>,<var>kMSG</var>,<var>kn</var>,<var>kN</var>,<var>knl</var>,<var>knp</var>,<var>knpn</var>,<var>knxt</var>,<var>kNXT</var>,<var>ko</var>,<var>kopn</var>,<var>kopt</var>,<var>kOPT</var>,<var>kP</var>,<var>kpp</var>,<var>kppn</var>,<var>kprt</var>,<var>kPRT</var>,<var>kprv</var>,<var>kPRV</var>,<var>kquit</var>,<var>kr</var>,<var>kR</var>,<var>krdo</var>,<var>kRDO</var>,<var>kref</var>,<var>kres</var>,<var>kRES</var>,<var>krfr</var>,<var>kri</var>,<var>kRIT</var>,<var>krmir</var>,<var>krpl</var>,<var>kRPL</var>,<var>krst</var>,<var>ks</var>,<var>kS</var>,<var>ksav</var>,<var>kSAV</var>,<var>kscl</var>,<var>kscr</var>,<var>ksel</var>,<var>ksf1</var>,<var>ksf10</var>,<var>ksf2</var>,<var>ksf3</var>,<var>ksf4</var>,<var>ksf5</var>,<var>ksf6</var>,<var>ksf7</var>,<var>ksf8</var>,<var>ksf9</var>,<var>kslt</var>,<var>kspd</var>,<var>kSPD</var>,<var>kt</var>,<var>kT</var>,<var>ktab</var>,<var>ktbc</var>,<var>ku</var>,<var>kund</var>,<var>kUND</var>,<var>l0</var>,<var>l1</var>,<var>l2</var>,<var>l3</var>,<var>l4</var>,<var>l5</var>,<var>l6</var>,<var>l7</var>,<var>l8</var>,<var>l9</var>,<var>la</var>,<var>label_format</var>,<var>label_height</var>,<var>label_off</var>,<var>label_on</var>,<var>label_width</var>,<var>lab_f0</var>,<var>lab_f1</var>,<var>lab_f10</var>,<var>lab_f2</var>,<var>lab_f3</var>,<var>lab_f4</var>,<var>lab_f5</var>,<var>lab_f6</var>,<var>lab_f7</var>,<var>lab_f8</var>,<var>lab_f9</var>,<var>le</var>,<var>LE</var>,<var>Lf</var>,<var>LF</var>,<var>lf0</var>,<var>lf1</var>,<var>lf10</var>,<var>lf2</var>,<var>lf3</var>,<var>lf4</var>,<var>lf5</var>,<var>lf6</var>,<var>lf7</var>,<var>lf8</var>,<var>lf9</var>,<var>lh</var>,<var>li</var>,<var>linefeed_if_not_lf</var>,<var>linefeed_is_newline</var>,<var>lines</var>,<var>lines_of_memory</var>,<var>ll</var>,<var>lm</var>,<var>LO</var>,<var>lpi</var>,<var>lpi_changes_res</var>,<var>lpix</var>,<var>lvert</var>,<var>lw</var>,<var>ma</var>,<var>maddr</var>,<var>magic_cookie_glitch</var>,<var>magic_cookie_glitch_ul</var>,<var>max_attributes</var>,<var>max_colors</var>,<var>maximum_windows</var>,<var>max_micro_address</va
r>,<var>max_micro_jump</var>,<var>max_pairs</var>,<var>mb</var>,<var>MC</var>,<var>mc0</var>,<var>mc4</var>,<var>mc5</var>,<var>mc5i</var>,<var>mc5p</var>,<var>mcs</var>,<var>mcub</var>,<var>mcub1</var>,<var>mcud</var>,<var>mcud1</var>,<var>mcuf</var>,<var>mcuf1</var>,<var>mcuu</var>,<var>mcuu1</var>,<var>md</var>,<var>me</var>,<var>meml</var>,<var>memory_above</var>,<var>memory_below</var>,<var>memory_lock</var>,<var>memory_unlock</var>,<var>memu</var>,<var>meta_off</var>,<var>meta_on</var>,<var>mgc</var>,<var>mh</var>,<var>mhpa</var>,<var>mi</var>,<var>Mi</var>,<var>micro_col_size</var>,<var>micro_column_address</var>,<var>micro_down</var>,<var>micro_left</var>,<var>micro_line_size</var>,<var>micro_right</var>,<var>micro_row_address</var>,<var>micro_up</var>,<var>minfo</var>,<var>mir</var>,<var>mjump</var>,<var>mk</var>,<var>ml</var>,<var>ML</var>,<var>mls</var>,<var>mm</var>,<var>mo</var>,<var>mouse_info</var>,<var>move_insert_mode</var>,<var>move_standout_mode</var>,<var>mp</var>,<var>mr</var>,<var>MR</var>,<var>mrcup</var>,<var>ms</var>,<var>msgr</var>,<var>MT</var>,<var>mu</var>,<var>mvpa</var>,<var>MW</var>,<var>nc</var>,<var>NC</var>,<var>ncv</var>,<var>nd</var>,<var>ND</var>,<var>ndscr</var>,<var>needs_xon_xoff</var>,<var>nel</var>,<var>newline</var>,<var>new_line_delay</var>,<var>nl</var>,<var>Nl</var>,<var>NL</var>,<var>nlab</var>,<var>no_color_video</var>,<var>no_correctly_working_cr</var>,<var>no_esc_ctlc</var>,<var>non_dest_scroll_region</var>,<var>non_rev_rmcup</var>,<var>no_pad_char</var>,<var>NP</var>,<var>npc</var>,<var>npins</var>,<var>NR</var>,<var>nrrmc</var>,<var>ns</var>,<var>number_of_function_keys</var>,<var>number_of_pins</var>,<var>num_labels</var>,<var>nw</var>,<var>nx</var>,<var>nxon</var>,<var>oc</var>,<var>op</var>,<var>orc</var>,<var>order_of_pins</var>,<var>orhi</var>,<var>orig_colors</var>,<var>orig_pair</var>,<var>orl</var>,<var>orvi</var>,<var>os</var>,<var>OTbc</var>,<var>OTbs</var>,<var>OTdB</var>,<var>OTdC</var>,<var>OTdN</var>,<var>OTdT</var>,<var>OTG1</var>,<var>OTG2</var>,<var>OTG3</var>,<var>OTG4</var>,<var>OTGC</var>,<var>OTGD</var>,<var>OTGH</var>,<var>OTGL</var>,<var>OTGR</var>,<var>OTGU</var>,<var>OTGV</var>,<var>other_non_function_keys</var>,<var>OTi2</var>,<var>OTkn</var>,<var>OTko</var>,<var>OTma</var>,<var>OTMT</var>,<var>OTnc</var>,<var>OTnl</var>,<var>OTNL</var>,<var>OTns</var>,<var>OTpt</var>,<var>OTrs</var>,<var>OTug</var>,<var>OTxr</var>,<var>output_res_char</var>,<var>output_res_horz_inch</var>,<var>output_res_line</var>,<var>output_res_vert_inch</var>,<var>over_strike</var>,<var>pa</var>,<var>PA</var>,<var>pad</var>,<var>pad_char</var>,<var>padding_baud_rate</var>,<var>pairs</var>,<var>parm_dch</var>,<var>parm_delete_line</var>,<var>parm_down_cursor</var>,<var>parm_down_micro</var>,<var>parm_ich</var>,<var>parm_index</var>,<var>parm_insert_line</var>,<var>parm_left_cursor</var>,<var>parm_left_micro</var>,<var>parm_right_cursor</var>,<var>parm_right_micro</var>,<var>parm_rindex</var>,<var>parm_up_cursor</var>,<var>parm_up_micro</var>,<var>pause</var>,<var>pb</var>,<var>pc</var>,<var>pc_term_options</var>,<var>pctrm</var>,<var>pf</var>,<var>pfkey</var>,<var>pfloc</var>,<var>pfx</var>,<var>pfxl</var>,<var>pk</var>,<var>pkey_key</var>,<var>pkey_local</var>,<var>pkey_plab</var>,<var>pkey_xmit</var>,<var>pl</var>,<var>plab_norm</var>,<var>pln</var>,<var>pn</var>,<var>po</var>,<var>pO</var>,<var>porder</var>,<var>print_rate</var>,<var>print_screen</var>,<var>prot</var>,<var>prtr_non</var>,<var>prtr_off</var>,<var>prtr_on</var>,<var>prtr_silent</var>,<var>ps</var>,<var>pt</var>,<var>PU</var>,<var>pulse</var>,<var>px</var>,<var>QD</var>,<var>qdial</var>,<var>quick_dial</var>,<var>r1</var>,<var>r2</var>,<var>r3</var>,<var>RA</var>,<var>rbim</var>,<var>rc</var>,<var>RC</var>,<var>rcsd</var>,<var>remove_clock</var>,<var>rep</var>,<var>repeat_char</var>,<var>req_for_input</var>,<var>req_mouse_pos</var>,<var>reqmp</var>,<var>reset_1string</var>,<var>reset_2string</var>,<var>reset_3string</var>,<var>reset_file</var>,<var>restore_cursor</var>,<var>return_does_clr_eol</var>,<var>rev</var>,<var>rf</var>,<var>RF</var>,<var>rfi</var>,<var>ri</var>,<var>RI</var>,<var>rin</var>,<var>ritm</var>,<var>rlm</var>,<var>rmacs</var>,<var>rmam</var>,<var>rmclk</var>,<var>rmcup</var>,<var>rmdc</var>,<var>rmicm</var>,<var>rmir</var>,<var>rmkx</var>,<var>rmln</var>,<var>rmm</var>,<var>rmp</var>,<var>rmpch</var>,<var>rmsc</var>,<var>rmso</var>,<var>rmul</var>,<var>rmxon</var>,<var>row_address</var>,<var>row_addr_glitch</var>,<var>rp</var>,<var>rP</var>,<var>RQ</var>,<var>rs</var>,<var>rs1</var>,<var>rs2</var>,<var>rs3</var>,<var>rshm</var>,<var>rsubm</var>,<var>rsupm</var>,<var>rum</var>,<var>rvert</var>,<var>rwidm</var>,<var>RX</var>,<var>s0</var>,<var>s0ds</var>,<var>s1</var>,<var>S1</var>,<var>s1ds</var>,<var>s2</var>,<var>S2</var>,<var>s2ds</var>,<var>s3</var>,<var>S3</var>,<var>s3ds</var>,<var>S4</var>,<var>S5</var>,<var>S6</var>,<var>S7</var>,<var>S8</var>,<var>sa</var>,<var>sA</var>,<var>SA</var>,<var>sam</var>,<var>save_cursor</var>,<var>Sb</var>,<var>sbim</var>,<var>sc</var>,<var>SC</var>,<var>scancode_escape</var>,<var>scesa</var>,<var>scesc</var>,<var>sclk</var>,<var>scp</var>,<var>scroll_forward</var>,<var>scroll_reverse</var>,<var>scs</var>,<var>scsd</var>,<var>sdrfq</var>,<var>se</var>,<var>select_char_set</var>,<var>semi_auto_right_margin</var>,<var>set0_des_seq</var>,<var>set1_des_seq</var>,<var>set2_des_seq</var>,<var>set3_des_seq</var>,<var>set_a_attributes</var>,<var>setab</var>,<var>set_a_background</var>,<var>setaf</var>,<var>set_a_foreground</var>,<var>set_attributes</var>,<var>setb</var>,<var>set_background</var>,<var>set_bottom_margin</var>,<var>set_bottom_margin_parm</var>,<var>set_clock</var>,<var>setcolor</var>,<var>set_color_band</var>,<var>set_color_pair</var>,<var>setf</var>,<var>set_foreground</var>,<var>set_left_margin</var>,<var>set_left_margin_parm</var>,<var>set_lr_margin</var>,<var>set_page_length</var>,<var>set_pglen_inch</var>,<var>set_right_margin</var>,<var>set_right_margin_parm</var>,<var>set_tab</var>,<var>set_tb_margin</var>,<var>set_top_margin</var>,<var>set_top_margin_parm</var>,<var>set_window</var>,<var>sf</var>,<var>Sf</var>,<var>SF</var>,<var>sg</var>,<var>sgr</var>,<var>sgr0</var>,<var>sgr1</var>,<var>sitm</var>,<var>sL</var>,<var>slength</var>,<var>slines</var>,<var>slm</var>,<var>smacs</var>,<var>smam</var>,<var>smcup</var>,<var>smdc</var>,<var>smgb</var>,<var>smgbp</var>,<var>smgl</var>,<var>smglp</var>,<var>smglr</var>,<var>smgr</var>,<var>smgrp</var>,<var>smgt</var>,<var>smgtb</var>,<var>smgtp</var>,<var>smicm</var>,<var>smir</var>,<var>smkx</var>,<var>smln</var>,<var>smm</var>,<var>smpch</var>,<var>smsc</var>,<var>smso</var>,<var>smul</var>,<var>smxon</var>,<var>snlq</var>,<var>snrmq</var>,<var>so</var>,<var>sp</var>,<var>spinh</var>,<var>spinv</var>,<var>sr</var>,<var>SR</var>,<var>sshm</var>,<var>ssubm</var>,<var>ssupm</var>,<var>st</var>,<var>start_bit_image</var>,<var>start_char_set_def</var>,<var>status_line_esc_ok</var>,<var>stop_bit_image</var>,<var>stop_char_set_def</var>,<var>subcs</var>,<var>subscript_characters</var>,<var>sum</var>,<var>supcs</var>,<var>superscript_characters</var>,<var>swidm</var>,<var>SX</var>,<var>ta</var>,<var>tab</var>,<var>tbc</var>,<var>te</var>,<var>termcap_init2</var>,<var>termcap_reset</var>,<var>these_cause_cr</var>,<var>ti</var>,<var>tilde_glitch</var>,<var>TO</var>,<var>tone</var>,<var>topl</var>,<var>to_status_line</var>,<var>transparent_underline</var>,<var>ts</var>,<var>tsl</var>,<var>u0</var>,<var>u1</var>,<var>u2</var>,<var>u3</var>,<var>u4</var>,<var>u5</var>,<var>u6</var>,<var>u7</var>,<var>u8</var>,<var>u9</var>,<var>uc</var>,<var>ue</var>,<var>ug</var>,<var>ul</var>,<var>underline_char</var>,<var>up</var>,<var>UP</var>,<var>up_half_line</var>,<var>us</var>,<var>user0</var>,<var>user1</var>,<var>user2</var>,<var>user3</var>,<var>user4</var>,<var>user5</var>,<var>user6</var>,<var>user7</var>,<var>user8</var>,<var>user9</var>,<var>ut</var>,<var>vb</var>,<var>ve</var>,<var>vi</var>,<var>virtual_terminal</var>,<var>vpa</var>,<var>vs</var>,<var>vt</var>,<var>WA</var>,<var>wait</var>,<var>wait_tone</var>,<var>WG</va
r>,<var>wi</var>,<var>widcs</var>,<var>wide_char_size</var>,<var>width_status_line</var>,<var>wind</var>,<var>wingo</var>,<var>wnum</var>,<var>ws</var>,<var>wsl</var>,<var>xb</var>,<var>xenl</var>,<var>XF</var>,<var>Xh</var>,<var>xhp</var>,<var>xhpa</var>,<var>xl</var>,<var>Xl</var>,<var>xmc</var>,<var>xn</var>,<var>XN</var>,<var>xo</var>,<var>Xo</var>,<var>xoffc</var>,<var>xoff_character</var>,<var>xon</var>,<var>xonc</var>,<var>xon_character</var>,<var>xon_xoff</var>,<var>xr</var>,<var>Xr</var>,<var>xs</var>,<var>xsb</var>,<var>xt</var>,<var>Xt</var>,<var>Xv</var>,<var>xvpa</var>,<var>Xy</var>,<var>Ya</var>,<var>YA</var>,<var>Yb</var>,<var>YB</var>,<var>Yc</var>,<var>YC</var>,<var>Yd</var>,<var>YD</var>,<var>Ye</var>,<var>YE</var>,<var>Yf</var>,<var>YF</var>,<var>Yg</var>,<var>YG</var>,<var>Yh</var>,<var>Yi</var>,<var>Yj</var>,<var>Yk</var>,<var>Yl</var>,<var>Ym</var>,<var>Yn</var>,<var>Yo</var>,<var>Yp</var>,<var>Yv</var>,<var>Yw</var>,<var>Yx</var>,<var>Yy</var>,<var>Yz</var>,<var>YZ</var>,<var>Za</var>,<var>ZA</var>,<var>Zb</var>,<var>ZB</var>,<var>Zc</var>,<var>ZC</var>,<var>Zd</var>,<var>ZD</var>,<var>Ze</var>,<var>ZE</var>,<var>zerom</var>,<var>zero_motion</var>,<var>Zf</var>,<var>ZF</var>,<var>Zg</var>,<var>ZG</var>,<var>Zh</var>,<var>ZH</var>,<var>Zi</var>,<var>ZI</var>,<var>Zj</var>,<var>ZJ</var>,<var>Zk</var>,<var>ZK</var>,<var>Zl</var>,<var>ZL</var>,<var>Zm</var>,<var>ZM</var>,<var>Zn</var>,<var>ZN</var>,<var>Zo</var>,<var>ZO</var>,<var>Zp</var>,<var>ZP</var>,<var>Zq</var>,<var>ZQ</var>,<var>Zr</var>,<var>ZR</var>,<var>Zs</var>,<var>ZS</var>,<var>Zt</var>,<var>ZT</var>,<var>Zu</var>,<var>ZU</var>,<var>Zv</var>,<var>ZV</var>,<var>Zw</var>,<var>ZW</var>,<var>Zx</var>,<var>ZX</var>,<var>Zy</var>,<var>ZY</var>,<var>Zz</var>,<var>ZZ</var></p>


<h2>TERMINAL TYPE DESCRIPTIONS SOURCE FILE</h2>
<pre>ANSI, UNIX CONSOLE, AND SPECIAL TYPES
Specials
ANSI.SYS/ISO 6429/ECMA-48 Capabilities
ANSI/ECMA-48 terminals and terminal emulators
DOS ANSI.SYS variants
ANSI console types
BeOS
Linux consoles
Mach
OSF Unix
QNX
NetBSD consoles
FreeBSD console entries
386BSD and BSD/OS Consoles
DEC VT52
DEC VT100 and compatibles
VT100 emulations
X terminal emulators
MGR
UNIX VIRTUAL TERMINALS, VIRTUAL CONSOLES, AND TELNET CLIENTS
Pilot Pro Palm-Top
COMMERCIAL WORKSTATION CONSOLES
Alpha consoles
Sun consoles
Iris consoles
NeWS consoles
NeXT consoles
Sony NEWS workstations
Common Desktop Environment
Non-Unix Consoles
COMMON TERMINAL TYPES
Altos
Hewlett-Packard (hp)
Honeywell-Bull
Lear-Siegler (adm)
Prime
Qume (qvt)
Televideo (tvi)
Visual (vi)
Wyse (wy)
Kermit terminal emulations
NON-ANSI TERMINAL EMULATIONS
Avatar
RBcomm
LCD DISPLAYS
Matrix Orbital
OLDER TERMINAL TYPES
AT&amp;amp;T (att, tty)
Ampex (Dialogue)
Ann Arbor (aa)
Applied Digital Data Systems (adds)
C. Itoh Electronics
Control Data (cdc)
Getronics
Human Designed Systems (Concept)
Contel Business Systems.
Data General (dg)
Datamedia (dm)
Falco</pre>






<p>Just something sorta cool for you to check out</p>
<pre>{
 local t=`tputm &#039;clear&#039; &#039;setaf 75&#039;` l a b f=/tmp/ps IFS=&#039; &#039;;
exec 6&lt;&gt;$f;ps L|tr -s &#039; &#039; &amp;&gt;$f;
while read -u6 l;do a=${l/% */} b=${l/* /};
figlet -rtw $((${COLUMNS} /2 )) -f big "$l";
tput sgr0;
command ps wwo pid:6,user:8,vsize:8,comm:20,$a:50 k -$a -A;cont;
done;
};</pre><p><a href="http://www.askapache.com/linux/zen-terminal-escape-codes.html"></a><a href="http://www.askapache.com/linux/zen-terminal-escape-codes.html">Terminal Escape Code Zen</a> originally appeared on <cite>AskApache.com</cite> </p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/linux/zen-terminal-escape-codes.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Htaccess Rewrites &#8211; Rewrite Tricks and Tips</title>
		<link>http://www.askapache.com/htaccess/modrewrite-tips-tricks.html</link>
		<comments>http://www.askapache.com/htaccess/modrewrite-tips-tricks.html#comments</comments>
		<pubDate>Sun, 10 Apr 2011 14:05:00 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Htaccess]]></category>

		<guid isPermaLink="false">http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html</guid>
		<description><![CDATA[<p><strong>htaccess rewrite</strong> / Mod_Rewrite Tips and Tricks is as glamorous as it sounds!  htaccess rewrite mod_rewrite is just possibly one of the most useful Apache modules and features.  The ability to rewrite requests internally as well as externally is extremely powerful.</p>
<p><a class="hs hs13" href="http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html"></a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.askapache.com/htaccess/modrewrite-tips-tricks.html"></a><a href="http://www.askapache.com/htaccess/modrewrite-tips-tricks.html"><cite>AskApache.com</cite></a></p><p><strong>Htaccess Rewrites</strong> are enabled by using the Apache module <a href="http://www.askapache.com/servers/mod_rewrite.c.html">mod_rewrite</a>, which is one of the most powerful Apache modules and features availale.  Htaccess Rewrites through mod_rewrite provide the special ability to <strong>Rewrite requests internally</strong> as well as <em>Redirect request externally</em>.<br class="C" /></p>
<p><a class="hs hs13" href="http://www.askapache.com/servers/mod_rewrite.c.html"></a></p>

<p>When the url in your browser's location bar stays the same for a request it is an internal rewrite, when the url changes an external redirection is taking place.  This is one of the first, and one of the biggest mental-blocks people have when learning about mod_rewrite...  But I have a secret weapon for you to use, a new discovery from years of research that makes learning mod_rewrite drastically quicker and easier.  It truly does or I wouldn't be saying so in the introduction of this article.</p>

<blockquote><p>Despite the tons of examples and docs, <strong>mod_rewrite is voodoo</strong>.
Damned cool voodoo, but still voodoo.<br />-- <cite>Brian Moore</cite></p></blockquote>

<p class="anote"><strong>Note:</strong>  After years of fighting to learn my way through rewriting urls with mod_rewrite, I finally had a breakthrough and found a way to outsmart the difficulty of mod_rewrite that I just couldn't seem to master.  The <a href="http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet.html">Mod_Rewrite RewriteCond/RewriteRule Variable Value Cheatsheet</a> is the one-of-a-kind tool that changed the game for me and made mod_rewriting no-harder than anything else.</p>

<p>So keep that mod_rewrite reference bookmarked and you will be able to figure out any RewriteRule or RewriteCond, an amazing feat considering it took me a LONG time to figure this stuff out on my own.  But that was before <a href="http://www.askapache.com/htaccess/crazy-advanced-mod_rewrite-tutorial.html">the craziness</a>, one of the most challenging and productive .htaccess experiments I've done... An experiment so <strong>ILL</strong> it's sick like a diamond disease on your wrist! $$$.  That mod_rewrite experiment/tutorial was the culmination of many different advanced mod_rewrite experiments I had done in the past and included most of my very best .htaccess tricks.  With the cheatsheet it's no longer Voodoo.. Its just what you do.  Now lets dig in!</p>



<h2>Htaccess rewrites TOC</h2>
        <ul>
            <li><a href="#default-mod-rewrite-hint" title=".htaccess mod rewrite should use Options +FollowSymLinks">.htaccess rewrite examples should begin with:</a></li>
            <li><a href="#require-the-www-in-htaccess" title="Use mod_rewrite in Apache htaccess to Require the www for SEO">Require the www</a></li>
            <li><a href="#require-no-www-in-htaccess" title="Use mod_rewrite in Apache htaccess to Require no www for SEO">Require no www</a></li>
            <li><a href="#check-for-key-in-query-string" title="Search for a key in the query string">Check for a key in QUERY_STRING</a></li>
            <li><a href="#delete-query-string" title="Remove the query string from url">Removes the QUERY_STRING from the URL</a></li>
            <li><a href="#fix-infinite-loop-redirects" title="Stop internal redirect looping">Fix for infinite loops</a></li>
            <li><a href="#external-redirect-php-files-to-html" title="Redirecting .php file extensions to .html">Redirect .php files to .html files (SEO friendly)</a></li>
            <li><a href="#internal-redirect-php-files-to-html" title="Redirecting .html file extensions to .php">Redirect .html files to actual .php files (SEO friendly)</a></li>
            <li><a href="#time-based-access" title="Deny access with Apache htaccess during certain hours of the day">block access to files during certain hours of the day</a></li>
            <li><a href="#convert-underscore-hyphen" title="Change underscores to hyphens for SEO URL">Rewrite underscores to hyphens for SEO URL</a></li>
            <li><a href="#require-www-no-hardcoding" title="mod_rewrite example of SEO 301 redirecting non-www to www">Require the www without hardcoding</a></li>
            <li><a href="#require-no-subdomain-1" title="mod_rewrite subdomain usage example of SEO 301 redirecting">Require no subdomain</a></li>
            <li><a href="#require-no-subdomain-2" title="Apache htaccess htaccess rewrite ~without slash">Require no subdomain</a></li>
            <li><a href="#redirect-wordpress-feed" title="Rewriting WordPress RSS feeds to Feedburner in SEO friendly method">Redirecting WordPress Feeds to Feedburner</a></li>
            <li><a href="#only-allow-get-and-put-requests" title="Deny Request Methods other than GET or PUT">Only allow GET and PUT request methods</a></li>
            <li><a href="#prevent-hotlinking" title="hotlinking and bandwidth stealing with mod_rewrite, hotlinking example">Prevent Files image/file hotlinking and bandwidth stealing</a></li>
            <li><a href="#stop-browser-prefetching" title="Fix prefetching in browsers">Stop browser prefetching</a></li>
        </ul>

<hr />

<p>If you really want to take a look, check out the <a href="http://www.askapache.com/servers/mod_rewrite.c.html">mod_rewrite.c</a> and <a href="http://www.askapache.com/servers/mod_rewrite.h.html">mod_rewrite.h</a> files.</p>

<p>Be aware that mod_rewrite (<em>RewriteRule, RewriteBase, and RewriteCond</em>) code is executed for each and every HTTP request that accesses a file in or below the directory where the code resides, so it's always good to limit the code to certain circumstances if readily identifiable.</p>
<p><strong>For example</strong>, to limit the next 5 RewriteRules to only be applied to .html and .php files, you can use the following code, which tests if the url does not end in .html or .php and if it doesn't, it will skip the next 5 RewriteRules.</p><hr />
<pre>RewriteRule !\.(html|php)$ - [S=5]
RewriteRule ^.*-(vf12|vf13|vf5|vf35|vf1|vf10|vf33|vf8).+$ - [S=1]</pre>

<h2><a href="#default-mod-rewrite-hint" name="default-mod-rewrite-hint" id="default-mod-rewrite-hint" title="Mostly .htaccess rewrite examples should begin with:" class="acd">.htaccess rewrite examples should begin with:</a></h2>
<pre>Options +FollowSymLinks
&nbsp;
RewriteEngine On
RewriteBase /</pre>


<h2><a href="#require-the-www-in-htaccess" name="require-the-www-in-htaccess" id="require-the-www-in-htaccess" title="Require the www" class="acd">Require the www</a></h2>
<pre>Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
RewriteRule ^(.*)$ http://www.askapache.com/$1 [R=301,L]</pre>


<h2>Loop Stopping Code</h2>
<p>Sometimes your rewrites cause infinite loops, stop it with one of these rewrite code snippets.</p>
<pre>RewriteCond %{REQUEST_URI} ^/(stats/|missing\.html|failed_auth\.html|error/).* [NC]
RewriteRule .* - [L]
&nbsp;
RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]</pre>

<h2>Cache-Friendly File Names</h2>
<p>This is probably my favorite, and I use it on every site I work on.  It allows me to update my javascript and css files in my visitors cache's simply by naming them differently in the html, on the server they stay the same name.  This rewrites all files for <code>/zap/j/anything-anynumber.js to /zap/j/anything.js and /zap/c/anything-anynumber.css to /zap/c/anything.css</code></p>
<pre>RewriteRule ^zap/(j|c)/([a-z]+)-([0-9]+)\.(js|css)$ /zap/$1/$2.$4 [L]</pre>




<h2>SEO friendly link for non-flash browsers</h2>
<p>When you use flash on your site and you properly supply a link to download flash that shows up for non-flash aware browsers, it is nice to use a shortcut to keep your code clean and your external links to a minimum.  This code allows me to link to <code>site.com/getflash/</code> for non-flash aware browsers.</p>
<pre>RewriteRule ^getflash/?$ http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash [NC,L,R=307]</pre>

<h2>Removing the Query_String</h2>
<p>On many sites, the page will be displayed for both page.html and page.html?anything=anything, which hurts your SEO with duplicate content.  An easy way to fix this issue is to redirect external requests containing a query string to the same uri without the query_string.</p>
<pre>RewriteCond %{THE_REQUEST} ^GET\ /.*\;.*\ HTTP/
RewriteCond %{QUERY_STRING} !^$
RewriteRule .* http://www.askapache.com%{REQUEST_URI}? [R=301,L]</pre>


<h2>Sending requests to a php script</h2>
<p>This .htaccess rewrite example invisibly rewrites requests for all Adobe pdf files to be handled by <code>/cgi-bin/pdf-script.php</code></p>
<pre>RewriteRule ^(.+)\.pdf$  /cgi-bin/pdf-script.php?file=$1.pdf [L,NC,QSA]</pre>


<h2>Setting the language variable based on Client</h2>
<p>For sites using multiviews or with multiple language capabilities, it is nice to be able to send the correct language automatically based on the clients preferred language.</p>
<pre>RewriteCond %{HTTP:Accept-Language} ^.*(de|es|fr|it|ja|ru|en).*$ [NC]
RewriteRule ^(.*)$ - [env=prefer-language:%1]</pre>



<h2>Deny Access To Everyone Except PHP fopen</h2>
<p>This allows access to all files by php fopen, but denies anyone else.</p>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^.+$ [NC]
RewriteRule .* - [F,L]</pre>


<p class="cnote">If you are looking for ways to block or deny specific requests/visitors, then you should definately read <a href="http://perishablepress.com/press/2009/02/03/eight-ways-to-blacklist-with-apaches-mod_rewrite/" title="Eight Ways to Blacklist with Apache’s mod_rewrite">Blacklist with mod_rewrite</a>.  I give it a 10/10</p>


<h2>Deny access to anything in a subfolder except php fopen</h2>
<p>This can be very handy if you want to serve media files or special downloads but only through a php proxy script.</p>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /([^/]+)/.*\ HTTP [NC]
RewriteRule .* - [F,L]</pre>





<h2><a href="#require-no-www-in-htaccess" name="require-no-www-in-htaccess" id="require-no-www-in-htaccess" title="Require no www" class="acd">Require no www</a></h2>
<pre>Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^askapache\.com$ [NC]
RewriteRule ^(.*)$ http://askapache.com/$1 [R=301,L]</pre>


<h2><a href="#check-for-key-in-query-string" name="check-for-key-in-query-string" id="check-for-key-in-query-string" title="Search for a key in the query string" class="acd">Check for a key in QUERY_STRING</a></h2>
<p>Uses a <a href="http://askapache.info/trunk/mod/mod_rewrite.html#rewritecond" title="RewriteCond Directive Use in htaccess">RewriteCond</a> Directive to check QUERY_STRING for passkey, if it doesn't find it it redirects all requests for anything in the /logged-in/ directory to the /login.php script.</p>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} !passkey
RewriteRule ^/logged-in/(.*)$ /login.php [L]</pre>


<h2><a href="#delete-query-string" name="delete-query-string" id="delete-query-string" title="Remove the query string from url" class="acd">Removes the QUERY_STRING from the URL</a></h2>
<p>If the QUERY_STRING has any value at all besides blank than the<code>?</code>at the end of /login.php? tells mod_rewrite to remove the QUERY_STRING from login.php and redirect.</p>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} .
RewriteRule ^login.php /login.php? [L]</pre>


<h2><a href="#fix-infinite-loop-redirects" name="fix-infinite-loop-redirects" id="fix-infinite-loop-redirects" title="Fix for infinite loops" class="acd">Fix for infinite loops</a></h2>
<p>An error message related to this is<code>Request exceeded the limit of 10 internal redirects due to probable configuration error. Use &#039;LimitInternalRecursion&#039; to increase the limit if necessary. Use &#039;LogLevel debug&#039; to get a backtrace.</code>or you may see<code>Request exceeded the limit</code>,<code>probable configuration error</code>,<code>Use &#039;LogLevel debug&#039; to get a backtrace</code>, or<code>Use &#039;LimitInternalRecursion&#039; to increase the limit if necessary</code></p>
<pre>RewriteCond %{ENV:REDIRECT_STATUS} 200
RewriteRule .* - [L]</pre>


<h2><a href="#external-redirect-php-files-to-html" name="external-redirect-php-files-to-html" id="external-redirect-php-files-to-html" title="External Redirect .php files to .html files (SEO friendly)" class="acd">External Redirect .php files to .html files (SEO friendly)</a></h2>
<pre>RewriteRule ^(.*)\.php$ /$1.html [R=301,L]</pre>


<h2><a href="#internal-redirect-php-files-to-html" name="internal-redirect-php-files-to-html" id="internal-redirect-php-files-to-html" title="Internal Redirect .php files to .html files (SEO friendly)" class="acd">Internal Redirect .php files to .html files (SEO friendly)</a></h2>
<p>Redirects all files that end in .html to be served from filename.php  so it looks like all your pages are .html but really they are .php</p>
<pre>RewriteRule ^(.*)\.html$ $1.php [R=301,L]</pre>


<h2><a href="#time-based-access" name="time-based-access" id="time-based-access" title="block access to files during certain hours of the day" class="acd">block access to files during certain hours of the day</a></h2>
<pre>Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# If the hour is 16 (4 PM) Then deny all access
RewriteCond %{TIME_HOUR} ^16$
RewriteRule ^.*$ - [F,L]</pre>


<h2><a href="#convert-underscore-hyphen" name="convert-underscore-hyphen" id="convert-underscore-hyphen" title="Change underscores to hyphens for SEO URL" class="acd">Rewrite underscores to hyphens for SEO URL</a></h2>
<p>Converts all underscores "_" in urls to hyphens "-" for SEO benefits...  See the <a href="http://www.askapache.com/htaccess/rewrite-underscores-to-hyphens-for-seo-url.html">full article</a> for more info.</p>
<pre>Options +FollowSymLinks
RewriteEngine On
RewriteBase /
&nbsp;
RewriteRule !\.(html|php)$ - [S=4]
RewriteRule ^([^_]*)_([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4-$5 [E=uscor:Yes]
RewriteRule ^([^_]*)_([^_]*)_([^_]*)_(.*)$ $1-$2-$3-$4 [E=uscor:Yes]
RewriteRule ^([^_]*)_([^_]*)_(.*)$ $1-$2-$3 [E=uscor:Yes]
RewriteRule ^([^_]*)_(.*)$ $1-$2 [E=uscor:Yes]
&nbsp;
RewriteCond %{ENV:uscor} ^Yes$
RewriteRule (.*) http://d.com/$1 [R=301,L]</pre>


<h2><a href="#require-www-no-hardcoding" name="require-www-no-hardcoding" id="require-www-no-hardcoding" title="Require the www without hardcoding" class="acd">Require the www without hardcoding</a></h2>
<pre>Options +FollowSymLinks
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.[a-z-]+\.[a-z]{2,6} [NC]
RewriteCond %{HTTP_HOST} ([a-z-]+\.[a-z]{2,6})$     [NC]
RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]</pre>


<h2><a href="#require-no-subdomain-1" name="require-no-subdomain-1" id="require-no-subdomain-1" title="Require no subdomain" class="acd">Require no subdomain</a></h2>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} \.([a-z-]+\.[a-z]{2,6})$ [NC]
RewriteRule ^/(.*)$ http://%1/$1 [R=301,L]</pre>


<h2><a href="#require-no-subdomain-2" name="require-no-subdomain-2" id="require-no-subdomain-2" title="Require no subdomain" class="acd">Require no subdomain</a></h2>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} \.([^\.]+\.[^\.0-9]+)$
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]</pre>


<h2><a href="#redirect-wordpress-feed" name="redirect-wordpress-feed" id="redirect-wordpress-feed" title="Redirecting WordPress Feeds to Feedburner" class="acd">Redirecting WordPress Feeds to Feedburner</a></h2>
<p>Full article:<a href="http://www.askapache.com/htaccess/redirecting-wordpress-feeds-to-feedburner.html" title="Redirecting WordPress Feeds to Feedburner">Redirecting WordPress Feeds to Feedburner</a></p>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_URI} ^/feed\.gif$
RewriteRule .* - [L]
&nbsp;
RewriteCond %{HTTP_USER_AGENT} !^.*(FeedBurner|FeedValidator) [NC]
RewriteRule ^feed/?.*$ http://feeds.feedburner.com/apache/htaccess [L,R=302]
&nbsp;
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]</pre>


<h2><a href="#only-allow-get-and-put-requests" name="only-allow-get-and-put-requests" id="only-allow-get-and-put-requests" title="Only allow GET and PUT request methods" class="acd">Only allow GET and PUT Request Methods</a></h2>
<p>Article: <a class="acd" href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#http-methods-recognized" title="List of Apache Recognized Request Methods">Request Methods</a></p>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_METHOD} !^(GET|PUT)
RewriteRule .* - [F]</pre>


<h2><a href="#prevent-hotlinking" name="prevent-hotlinking" id="prevent-hotlinking" title="Prevent Files image/file hotlinking and bandwidth stealing" class="acd">Prevent Files image/file hotlinking and bandwidth stealing</a></h2>
<pre>RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^http://(www\.)?askapache.com/.*$ [NC]
RewriteRule \.(gif|jpg|swf|flv|png)$ /feed/ [R=302,L]</pre>


<h2><a href="#stop-browser-prefetching" name="stop-browser-prefetching" id="stop-browser-prefetching" title="Stop browser prefetching" class="acd">Stop browser prefetching</a></h2>
<pre>RewriteEngine On
SetEnvIfNoCase X-Forwarded-For .+ proxy=yes
SetEnvIfNoCase X-moz prefetch no_access=yes
&nbsp;
# block pre-fetch requests with X-moz headers
RewriteCond %{ENV:no_access} yes
RewriteRule .* - [F,L]</pre>



<blockquote cite="http://askapache.info/trunk/mod/mod_rewrite.html#rewritebase">
<p>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 rules and an unlimited number of attached rule conditions for each rule, to provide a really flexible and powerful URL manipulation mechanism. The URL manipulations can depend on various tests, of server variables, environment variables, HTTP headers, or time stamps. Even external database lookups in various formats can be used to achieve highly granular URL matching.</p>
<p>This module operates on the full URLs (including the path-info part) both in per-server context (<code>httpd.conf</code>) and per-directory context (<code>.htaccess</code>) and can generate query-string parts on result. The rewritten result can lead to internal sub-processing, external request redirection or even to an internal proxy throughput.</p>
<p>Further details, discussion, and examples, are provided in the <a href="http://askapache.info/trunk/rewrite/index.html">detailed mod_rewrite documentation</a>.</p>
</blockquote>
<h2>Directives</h2>
<ul>
    <li><a href="http://askapache.info/trunk/mod/mod_rewrite.html#rewritebase">RewriteBase</a></li>
    <li><a href="http://askapache.info/trunk/mod/mod_rewrite.html#rewritecond">RewriteCond</a></li>
    <li><a href="http://askapache.info/2.2/mod/mod_rewrite.html#rewriteengine">RewriteEngine</a></li>
    <li><a href="http://askapache.info/trunk/mod/mod_rewrite.html#rewritelock">RewriteLock</a></li>
    <li><a href="http://askapache.info/2.0/mod/mod_rewrite.html#rewritelog">RewriteLog</a></li>
    <li><a href="http://askapache.info/trunk/mod/mod_rewrite.html#rewriteloglevel">RewriteLogLevel</a></li>
    <li><a href="http://askapache.info/trunk/mod/mod_rewrite.html#rewritemap">RewriteMap</a></li>
    <li><a href="http://askapache.info/1.3/mod/mod_rewrite.html#rewriteoptions">RewriteOptions</a></li>
    <li><a href="http://askapache.info/trunk/mod/mod_rewrite.html#rewriterule">RewriteRule</a></li>
</ul>



<p>If you aren't already comfortable using mod_rewrite then I recommend this <a href="http://check-these.info/mod_rewrite-basic.html">excellent mod_rewrite guide</a> by one of my favorite mod_rewrite gurus that I've met.</p>



<hr />
<h2>htaccess Guide Sections</h2>
<ul class="ou">
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/htaccess-for-webmasters.html" title="Apache HTTP Web Server htaccess tips and tricks">htaccess tricks for Webmasters</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/using-http-headers-with-htaccess.html" title="Creating and using HTTP Headers with htaccess">HTTP Header control with htaccess</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/php-htaccess-tips-and-tricks.html" title="mod_php or php as a cgi with htaccess tips, htaccess php tricks">PHP on Apache tips and tricks</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/seo-search-engine-friendly-redirects-without-mod_rewrite.html" title="SEO-Friendly 301 Redirects without mod_rewrite">SEO Redirects without mod_rewrite</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/mod_rewrite-tips-and-tricks.html" title="mod_rewrite tips and tricks with RewriteEngine, RewriteBase, RewriteRule, and RewriteCond">mod_rewrite examples, tips, and tricks</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/speed-up-your-site-with-caching-and-cache-control.html" title="Caching, cache-control, cache, expires, and optimizing htaccess">HTTP Caching and Site Speedups</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/apache-authentication-in-htaccess.html" title="htaccess and Apache authentication with htpasswd, 401, and 403">Authentication on Apache</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/security-with-htaccess.html" title="Security, hacking, and anti-hacking tips and tricks for htaccess">htaccess Security Tricks and Tips</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/ssl-example-usage-in-htaccess.html" title="Apache SSL examples">SSL tips and examples</a></li>
    <li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/apache-variable-fun-in-htaccess.html" title="Apache variables info, tricks, and tips">Variable Fun (mod_env) Section</a></li><li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/mod_security-htaccess-tricks.html" title="mod_security Guide and sample mod_Security diretive usage in .htaccess">.htaccess Security with MOD_SECURITY</a></li><li><a rel="chapter bookmark" href="http://www.askapache.com/htaccess/setenvif.html" title="SetEnvIf and SetEnvIfNoCase Examples for conditionally setting variables in Apache .htaccess">SetEnvIf and SetEnvIfNoCase Examples</a></li>
</ul>


<p class="ment"><a rel="prev" href="http://www.askapache.com/htaccess/seo-search-engine-friendly-redirects-without-mod_rewrite.html" title="Use htaccess to create SEO-Friendly 301 Redirects without mod_rewrite">&laquo;  Search Engine Friendly Redirects</a> | <a href="http://www.askapache.com/htaccess/htaccess.html" class="acd1" rel="Contents Index Start" title=".htaccess tutorial">.htaccess Tutorial Index</a> | <a rel="next" href="http://www.askapache.com/htaccess/speed-up-your-site-with-caching-and-cache-control.html" title="The Apache method for speeding up sites with Caching, cache-control, cache, expires, and optimizing htaccess">&raquo;  Speed up your site with Caching and cache-control</a></p><p><a href="http://www.askapache.com/htaccess/modrewrite-tips-tricks.html"></a><a href="http://www.askapache.com/htaccess/modrewrite-tips-tricks.html">Htaccess Rewrites &#8211; Rewrite Tricks and Tips</a> originally appeared on <cite>AskApache.com</cite> </p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/modrewrite-tips-tricks.html/feed</wfw:commentRss>
		<slash:comments>128</slash:comments>
		</item>
		<item>
		<title>HTTP Status Codes and Htaccess ErrorDocuments</title>
		<link>http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html</link>
		<comments>http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#comments</comments>
		<pubDate>Tue, 04 Jan 2011 20:56:15 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Htaccess]]></category>

		<guid isPermaLink="false">http://www.askapache.com.com/htaccess/wow-i-served-a-page-for-every-single-http-status-code-and-saved-headers-and-content.html</guid>
		<description><![CDATA[<p>There are a total of <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#apache-response-codes-57">57 HTTP Status Codes</a> recognized by the Apache Web Server.  Wouldn't you like to see what all those headers and their output, ErrorDocuments look like?</p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html"></a><a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html"><cite>AskApache.com</cite></a></p><p><strong>I was trying to find an official, authoritative list of HTTP Status Codes</strong> but I kept finding lists that weren't authoritative or complete. So I searched and found my answer in the Apache HTTP Server source code.  Once I had the exact HTTP Status Codes and resulting Error Documents sent by Apache, I researched deeper into HTTP Status Codes by reading as many related RFC's as I could find, and several other software source codes were explored.  This is the most authoritative list I know of, if you can do better leave a comment and I'll update it.  Another thing to keep in mind, the Status code number itself is what is used by software and hardware to make determinations, the phrase returned by the status code is for the human only and does not have any weight other than informing the user.. So "503 Service Unavailable", "503 Service Temporarily Unavailable", and "503 Get the heck outta here" are all completely valid.</p>
<p class="bnote"><strong>Update March 9, 2009</strong>: A lot of sites on the web have updated their HTTP status code lists to include the HTTP Status codes listed on this page, including Wikipedia, IANA, W3C, and others, so rest assured this info is accurate and complete.  If you'd like to see how to create custom error pages for all of these errors like mine  <a href="http://www.askapache.com/show-error-506">/show-error-506</a> , then check out  <a href="http://www.askapache.com/htaccess/advanced-htaccess-ssi.html">this detailed tutorial</a>  I just posted.</p>


<h2>Contents</h2>
<ul>
    <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#apache-response-codes-57">List of All 57 HTTP Response Status Code</a> </li>
    <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#quick-start">Quick Start to triggering ErrorDocuments for each Status Code</a> </li>
    <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#automating-the-process">Automate the ErrorDocument Triggering</a>
        <ul>
            <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#redirect-code-in-htaccess">The htaccess Code</a> </li>
            <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#php-header-grabber-script">PHP script that gets and outputs the Headers/Content</a> </li>
        </ul>
    </li>
    <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#headers-returned-content">Headers and Content Returned</a> </li>
    <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#apache-source-code">Apache Source Code</a>
        <ul>
            <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#httpdh-h">httpd.h</a> </li>
            <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#http_protocol-c">http_protocol.c</a> </li>
        </ul>
    </li>
</ul>


<h2> <a href="#apache-response-codes-57" name="apache-response-codes-57" id="apache-response-codes-57">57 APACHE HTTP STATUS RESPONSE CODES</a> </h2>
<p>Once I compiled the list of Apache recognized HTTP Status Codes, I was dying to see them all in action (<em>i.e. the corresponding <strong>ErrorDocument</strong></em>).  At first I thought I would have to create a php or perl script emulating each of the 57 HTTP Status Codes, a tedious undertaking I wasn't about to do.  Instead I "asked Apache" by searching the  <a href="http://httpd.apache.org/docs/trunk/">Apache HTTP Documentation</a>  for <em>ambiguity sending Status Codes and/or triggering ErrorDocuments</em> with an Apache Directive.<br /><strong>While reading</strong> up on  <a href="http://askapache.info/trunk/mod/mod_alias.html">mod_alias</a>  and the  <a href="http://askapache.info/trunk/mod/mod_alias.html#redirect">Redirect</a>  directive I found:</p>
<blockquote cite="http://httpd.apache.org/docs/trunk/mod/mod_alias.html#redirect"><cite>Apache Docs</cite>
    <p>Syntax: <strong>Redirect [status] URL-path URL</strong> The status argument can be used to return <strong>other</strong> HTTP status codes. <strong>Other</strong> status codes can be returned by giving the numeric status code as the value of status.  If the status is between 300 and 399, the URL argument must be present, otherwise it must be omitted.</p>
</blockquote>
<dl>
    <dt><a id="code-100" title="Continue">100 Continue</a> </dt>
    <dd><a title="ErrorDocument 100" href="/e/100/">ErrorDocument Continue</a>  |  <a href="#status-100" title="Sample Continue">Sample 100 Continue</a> <br />This means that the server has received the request headers, and that the client should proceed to send the request body (in case of a request which   needs to be sent; for example, a POST request). If the request body is large, sending it to a server when a request has already been rejected based upon inappropriate headers is inefficient.   To have a server check if the request could be accepted based on the requests headers alone, a client must send Expect: 100-continue as a header in its initial request (see RFC 2616 14.20 Expect header) and check if a 100 Continue status code is received in response before continuing (or receive 417 Expectation Failed and not continue).</dd>
    <dt><a id="code-101" title="Switching Protocols">101 Switching Protocols</a> </dt>
    <dd><a title="ErrorDocument 101" href="/e/101/">ErrorDocument Switching Protocols</a>  |  <a href="#status-101" title="Sample Switching Protocols">Sample 101 Switching Protocols</a> <br />This means the requester has asked the server to switch protocols and the server is acknowledging that it will do so.[3]</dd>
    <dt><a id="code-102" title="Processing">102 Processing</a> </dt>
    <dd><a title="ErrorDocument 102" href="/e/102/">ErrorDocument Processing</a>  |  <a href="#status-102" title="Sample Processing">Sample 102 Processing</a> <br />(WebDAV) - (RFC 2518 )</dd>
    <dt><a id="code-200" title="OK">200 OK</a> </dt>
    <dd><a title="ErrorDocument 200" href="/e/200/">ErrorDocument OK</a>  |  <a href="#status-200" title="Sample OK">Sample 200 OK</a> <br />Standard response for successful HTTP requests. The actual response will depend on the request method used. In a GET request, the response will contain an   entity corresponding to the requested resource. In a POST request the response will contain an entity describing or containing the result of the action.</dd>
    <dt><a id="code-201" title="Created">201 Created</a> </dt>
    <dd><a title="ErrorDocument 201" href="/e/201/">ErrorDocument Created</a>  |  <a href="#status-201" title="Sample Created">Sample 201 Created</a> <br />The request has been fulfilled and resulted in a new resource being created.</dd>
    <dt><a id="code-202" title="Accepted">202 Accepted</a> </dt>
    <dd><a title="ErrorDocument 202" href="/e/202/">ErrorDocument Accepted</a>  |  <a href="#status-202" title="Sample Accepted">Sample 202 Accepted</a> <br />The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it   might be disallowed when processing actually takes place.</dd>
    <dt><a id="code-203" title="Non-Authoritative Information">203 Non-Authoritative Information</a> </dt>
    <dd><a title="ErrorDocument 203" href="/e/203/">ErrorDocument Non-Authoritative Information</a>  |  <a href="#status-203" title="Sample Non-Authoritative Information">Sample 203 Non-Authoritative Information</a> <br />The server successfully processed the request, but is returning information that may be from another source.</dd>
    <dt><a id="code-204" title="No Content">204 No Content</a> </dt>
    <dd><a title="ErrorDocument 204" href="/e/204/">ErrorDocument No Content</a>  |  <a href="#status-204" title="Sample No Content">Sample 204 No Content</a> <br />The server successfully processed the request, but is not returning any content.</dd>
    <dt><a id="code-205" title="Reset Content">205 Reset Content</a> </dt>
    <dd><a title="ErrorDocument 205" href="/e/205/">ErrorDocument Reset Content</a>  |  <a href="#status-205" title="Sample Reset Content">Sample 205 Reset Content</a> <br />The server successfully processed the request, but is not returning any content. Unlike a 204 response, this response requires that the requester   reset the document view.</dd>
    <dt><a id="code-206" title="Partial Content">206 Partial Content</a> </dt>
    <dd><a title="ErrorDocument 206" href="/e/206/">ErrorDocument Partial Content</a>  |  <a href="#status-206" title="Sample Partial Content">Sample 206 Partial Content</a> <br />The server is delivering only part of the resource due to a range header sent by the client. This is used by tools like wget to enable resuming   of interrupted downloads, or split a download into multiple simultaneous streams.</dd>
    <dt><a id="code-207" title="Multi-Status">207 Multi-Status</a> </dt>
    <dd><a title="ErrorDocument 207" href="/e/207/">ErrorDocument Multi-Status</a>  |  <a href="#status-207" title="Sample Multi-Status">Sample 207 Multi-Status</a> <br />(WebDAV) - The message body that follows is an XML message and can contain a number of separate response codes, depending on how many sub-requests   were made.</dd>
    <dt><a id="code-226" title="IM Used">226 IM Used</a> </dt>
    <dd><a title="ErrorDocument 226" href="/e/226/">ErrorDocument IM Used</a>  |  <a href="#status-226" title="Sample IM Used">Sample 226 IM Used</a> <br />The server has fulfilled a GET request for the resource, and the response is a representation of the result of one or more instance-manipulations   applied to the current instance.  The actual current instance might not be available except by combining this response with other previous or future responses, as appropriate for the specific   instance-manipulation(s).</dd>
    <dt><a id="code-300" title="Multiple Choices">300 Multiple Choices</a> </dt>
    <dd><a title="ErrorDocument 300" href="/e/300/">ErrorDocument Multiple Choices</a>  |  <a href="#status-300" title="Sample Multiple Choices">Sample 300 Multiple Choices</a> <br />Indicates multiple options for the resource that the client may follow. It, for instance, could be used to present different format options for   video, list files with different extensions, or word sense disambiguation.</dd>
    <dt><a id="code-301" title="Moved Permanently">301 Moved Permanently</a> </dt>
    <dd><a title="ErrorDocument 301" href="/e/301/">ErrorDocument Moved Permanently</a>  |  <a href="#status-301" title="Sample Moved Permanently">Sample 301 Moved Permanently</a> <br />This and all future requests should be directed to the given URI.</dd>
    <dt><a id="code-302" title="Found">302 Found</a> </dt>
    <dd><a title="ErrorDocument 302" href="/e/302/">ErrorDocument Found</a>  |  <a href="#status-302" title="Sample Found">Sample 302 Found</a> <br />This is the most popular redirect code[citation needed], but also an example of industrial practice contradicting the standard. HTTP/1.0 specification   (RFC 1945 ) required the client to perform a temporary redirect (the original describing phrase was "Moved Temporarily"), but popular browsers implemented it as a 303 See Other. Therefore,   HTTP/1.1 added status codes 303 and 307 to disambiguate between the two behaviours. However, the majority of Web applications and frameworks still use the 302 status code as if it were the   303.</dd>
    <dt><a id="code-303" title="See Other">303 See Other</a> </dt>
    <dd><a title="ErrorDocument 303" href="/e/303/">ErrorDocument See Other</a>  |  <a href="#status-303" title="Sample See Other">Sample 303 See Other</a> <br />The response to the request can be found under another URI using a GET method. When received in response to a PUT, it should be assumed that the   server has received the data and the redirect should be issued with a separate GET message.</dd>
    <dt><a id="code-304" title="Not Modified">304 Not Modified</a> </dt>
    <dd><a title="ErrorDocument 304" href="/e/304/">ErrorDocument Not Modified</a>  |  <a href="#status-304" title="Sample Not Modified">Sample 304 Not Modified</a> <br />Indicates the resource has not been modified since last requested. Typically, the HTTP client provides a header like the If-Modified-Since header   to provide a time against which to compare. Utilizing this saves bandwidth and reprocessing on both the server and client, as only the header data must be sent and received in comparison to   the entirety of the page being re-processed by the server, then resent using more bandwidth of the server and client.</dd>
    <dt><a id="code-305" title="Use Proxy">305 Use Proxy</a> </dt>
    <dd><a title="ErrorDocument 305" href="/e/305/">ErrorDocument Use Proxy</a>  |  <a href="#status-305" title="Sample Use Proxy">Sample 305 Use Proxy</a> <br />Many HTTP clients (such as Mozilla[4] and Internet Explorer) do not correctly handle responses with this status code, primarily for security   reasons.</dd>
    <dt><a id="code-306" title="Switch Proxy">306 Switch Proxy</a> </dt>
    <dd><a title="ErrorDocument 306" href="/e/306/">ErrorDocument Switch Proxy</a>  |  <a href="#status-306" title="Sample Switch Proxy">Sample 306 Switch Proxy</a> <br />No longer used.</dd>
    <dt><a id="code-307" title="Temporary Redirect">307 Temporary Redirect</a> </dt>
    <dd><a title="ErrorDocument 307" href="/e/307/">ErrorDocument Temporary Redirect</a>  |  <a href="#status-307" title="Sample Temporary Redirect">Sample 307 Temporary Redirect</a> <br />In this occasion, the request should be repeated with another URI, but future requests can still use the original URI. In contrast to 303,   the request method should not be changed when reissuing the original request. For instance, a POST request must be repeated using another POST request.</dd>
    <dt><a id="code-400" title="Bad Request">400 Bad Request</a> </dt>
    <dd><a title="ErrorDocument 400" href="/e/400/">ErrorDocument Bad Request</a>  |  <a href="#status-400" title="Sample Bad Request">Sample 400 Bad Request</a> <br />The request contains bad syntax or cannot be fulfilled.</dd>
    <dt><a id="code-401" title="Unauthorized">401 Unauthorized</a> </dt>
    <dd><a title="ErrorDocument 401" href="/e/401/">ErrorDocument Unauthorized</a>  |  <a href="#status-401" title="Sample Unauthorized">Sample 401 Unauthorized</a> <br />Similar to 403 Forbidden, but specifically for use when authentication is possible but has failed or not yet been provided. The response must   include a WWW-Authenticate header field containing a challenge applicable to the requested resource. See Basic access authentication and Digest access authentication.</dd>
    <dt><a id="code-402" title="Payment Required">402 Payment Required</a> </dt>
    <dd><a title="ErrorDocument 402" href="/e/402/">ErrorDocument Payment Required</a>  |  <a href="#status-402" title="Sample Payment Required">Sample 402 Payment Required</a> <br />The original intention was that this code might be used as part of some form of digital cash or micropayment scheme, but that has not happened,   and this code has never been used.</dd>
    <dt><a id="code-403" title="Forbidden">403 Forbidden</a> </dt>
    <dd><a title="ErrorDocument 403" href="/e/403/">ErrorDocument Forbidden</a>  |  <a href="#status-403" title="Sample Forbidden">Sample 403 Forbidden</a> <br />The request was a legal request, but the server is refusing to respond to it. Unlike a 401 Unauthorized response, authenticating will make no   difference.</dd>
    <dt><a id="code-404" title="Not Found">404 Not Found</a> </dt>
    <dd><a title="ErrorDocument 404" href="/e/404/">ErrorDocument Not Found</a>  |  <a href="#status-404" title="Sample Not Found">Sample 404 Not Found</a> <br />The requested resource could not be found but may be available again in the future. Subsequent requests by the client are permissible.</dd>
    <dt><a id="code-405" title="Method Not Allowed">405 Method Not Allowed</a> </dt>
    <dd><a title="ErrorDocument 405" href="/e/405/">ErrorDocument Method Not Allowed</a>  |  <a href="#status-405" title="Sample Method Not Allowed">Sample 405 Method Not Allowed</a> <br />A request was made of a resource using a request method not supported by that resource; for example, using GET on a form which requires data   to be presented via POST, or using PUT on a read-only resource.</dd>
    <dt><a id="code-406" title="Not Acceptable">406 Not Acceptable</a> </dt>
    <dd><a title="ErrorDocument 406" href="/e/406/">ErrorDocument Not Acceptable</a>  |  <a href="#status-406" title="Sample Not Acceptable">Sample 406 Not Acceptable</a> <br />The requested resource is only capable of generating content not acceptable according to the Accept headers sent in the request.</dd>
    <dt><a id="code-407" title="Proxy Authentication Required">407 Proxy Authentication Required</a> </dt>
    <dd><a title="ErrorDocument 407" href="/e/407/">ErrorDocument Proxy Authentication Required</a>  |  <a href="#status-407" title="Sample Proxy Authentication Required">Sample 407 Proxy Authentication Required</a> <br />Required</dd>
    <dt><a id="code-408" title="Request Timeout">408 Request Timeout</a> </dt>
    <dd><a title="ErrorDocument 408" href="/e/408/">ErrorDocument Request Timeout</a>  |  <a href="#status-408" title="Sample Request Timeout">Sample 408 Request Timeout</a> <br />The server timed out waiting for the request.</dd>
    <dt><a id="code-409" title="Conflict">409 Conflict</a> </dt>
    <dd><a title="ErrorDocument 409" href="/e/409/">ErrorDocument Conflict</a>  |  <a href="#status-409" title="Sample Conflict">Sample 409 Conflict</a> <br />Indicates that the request could not be processed because of conflict in the request, such as an edit conflict.</dd>
    <dt><a id="code-410" title="Gone">410 Gone</a> </dt>
    <dd><a title="ErrorDocument 410" href="/e/410/">ErrorDocument Gone</a>  |  <a href="#status-410" title="Sample Gone">Sample 410 Gone</a> <br />Indicates that the resource requested is no longer available and will not be available again. This should be used when a resource has been intentionally   removed; however, it is not necessary to return this code and a 404 Not Found can be issued instead. Upon receiving a 410 status code, the client should not request the resource again in the   future. Clients such as search engines should remove the resource from their indexes.</dd>
    <dt><a id="code-411" title="Length Required">411 Length Required</a> </dt>
    <dd><a title="ErrorDocument 411" href="/e/411/">ErrorDocument Length Required</a>  |  <a href="#status-411" title="Sample Length Required">Sample 411 Length Required</a> <br />The request did not specify the length of its content, which is required by the requested resource.</dd>
    <dt><a id="code-412" title="Precondition Failed">412 Precondition Failed</a> </dt>
    <dd><a title="ErrorDocument 412" href="/e/412/">ErrorDocument Precondition Failed</a>  |  <a href="#status-412" title="Sample Precondition Failed">Sample 412 Precondition Failed</a> <br />The server does not meet one of the preconditions that the requester put on the request.</dd>
    <dt><a id="code-413" title="Request Entity Too Large">413 Request Entity Too Large</a> </dt>
    <dd><a title="ErrorDocument 413" href="/e/413/">ErrorDocument Request Entity Too Large</a>  |  <a href="#status-413" title="Sample Request Entity Too Large">Sample 413 Request Entity Too Large</a> <br />The request is larger than the server is willing or able to process.</dd>
    <dt><a id="code-414" title="Request-URI Too Long">414 Request-URI Too Long</a> </dt>
    <dd><a title="ErrorDocument 414" href="/e/414/">ErrorDocument Request-URI Too Long</a>  |  <a href="#status-414" title="Sample Request-URI Too Long">Sample 414 Request-URI Too Long</a> <br />The URI provided was too long for the server to process.</dd>
    <dt><a id="code-415" title="Unsupported Media Type">415 Unsupported Media Type</a> </dt>
    <dd><a title="ErrorDocument 415" href="/e/415/">ErrorDocument Unsupported Media Type</a>  |  <a href="#status-415" title="Sample Unsupported Media Type">Sample 415 Unsupported Media Type</a> <br />The request did not specify any media types that the server or resource supports. For example the client specified that an image resource   should be served as image/svg+xml, but the server cannot find a matching version of the image.</dd>
    <dt><a id="code-416" title="Requested Range Not Satisfiable">416 Requested Range Not Satisfiable</a> </dt>
    <dd><a title="ErrorDocument 416" href="/e/416/">ErrorDocument Requested Range Not Satisfiable</a>  |  <a href="#status-416" title="Sample Requested Range Not Satisfiable">Sample 416 Requested Range Not Satisfiable</a> <br />The client has asked for a portion of the file, but the server cannot supply that portion (for example, if the client asked for   a part of the file that lies beyond the end of the file).</dd>
    <dt><a id="code-417" title="Expectation Failed">417 Expectation Failed</a> </dt>
    <dd><a title="ErrorDocument 417" href="/e/417/">ErrorDocument Expectation Failed</a>  |  <a href="#status-417" title="Sample Expectation Failed">Sample 417 Expectation Failed</a> <br />The server cannot meet the requirements of the Expect request-header field.</dd>
    <dt><a id="code-418" title="I'm a teapot">418 I'm a teapot</a> </dt>
    <dd><a title="ErrorDocument 418" href="/e/418/">ErrorDocument I'm a teapot</a>  |  <a href="#status-418" title="Sample I'm a teapot">Sample 418 I'm a teapot</a> <br />The HTCPCP server is a teapot. The responding entity MAY be short and stout. Defined by the April Fools specification RFC 2324. See Hyper Text   Coffee Pot Control Protocol for more information.</dd>
    <dt><a id="code-422" title="Unprocessable Entity">422 Unprocessable Entity</a> </dt>
    <dd><a title="ErrorDocument 422" href="/e/422/">ErrorDocument Unprocessable Entity</a>  |  <a href="#status-422" title="Sample Unprocessable Entity">Sample 422 Unprocessable Entity</a> <br />(WebDAV) (RFC 4918 ) - The request was well-formed but was unable to be followed due to semantic errors.</dd>
    <dt><a id="code-423" title="Locked">423 Locked</a> </dt>
    <dd><a title="ErrorDocument 423" href="/e/423/">ErrorDocument Locked</a>  |  <a href="#status-423" title="Sample Locked">Sample 423 Locked</a> <br />(WebDAV) (RFC 4918 ) - The resource that is being accessed is locked</dd>
    <dt><a id="code-424" title="Failed Dependency">424 Failed Dependency</a> </dt>
    <dd><a title="ErrorDocument 424" href="/e/424/">ErrorDocument Failed Dependency</a>  |  <a href="#status-424" title="Sample Failed Dependency">Sample 424 Failed Dependency</a> <br />(WebDAV) (RFC 4918 ) - The request failed due to failure of a previous request (e.g. a PROPPATCH).</dd>
    <dt><a id="code-425" title="Unordered Collection">425 Unordered Collection</a> </dt>
    <dd><a title="ErrorDocument 425" href="/e/425/">ErrorDocument Unordered Collection</a>  |  <a href="#status-425" title="Sample Unordered Collection">Sample 425 Unordered Collection</a> <br />Defined in drafts of WebDav Advanced Collections, but not present in "Web Distributed Authoring and Versioning (WebDAV) Ordered Collections   Protocol" (RFC 3648).</dd>
    <dt><a id="code-426" title="Upgrade Required">426 Upgrade Required</a> </dt>
    <dd><a title="ErrorDocument 426" href="/e/426/">ErrorDocument Upgrade Required</a>  |  <a href="#status-426" title="Sample Upgrade Required">Sample 426 Upgrade Required</a> <br />(RFC 2817 ) - The client should switch to TLS/1.0.</dd>
    <dt><a id="code-449" title="Retry With">449 Retry With</a> </dt>
    <dd><a title="ErrorDocument 449" href="/e/449/">ErrorDocument Retry With</a>  |  <a href="#status-449" title="Sample Retry With">Sample 449 Retry With</a> <br />A Microsoft extension. The request should be retried after doing the appropriate action.</dd>
    <dt><a id="code-500" title="Internal Server Error">500 Internal Server Error</a> </dt>
    <dd><a title="ErrorDocument 500" href="/e/500/">ErrorDocument Internal Server Error</a>  |  <a href="#status-500" title="Sample Internal Server Error">Sample 500 Internal Server Error</a> <br />A generic error message, given when no more specific message is suitable.</dd>
    <dt><a id="code-501" title="Not Implemented">501 Not Implemented</a> </dt>
    <dd><a title="ErrorDocument 501" href="/e/501/">ErrorDocument Not Implemented</a>  |  <a href="#status-501" title="Sample Not Implemented">Sample 501 Not Implemented</a> <br />The server either does not recognise the request method, or it lacks the ability to fulfil the request.</dd>
    <dt><a id="code-502" title="Bad Gateway">502 Bad Gateway</a> </dt>
    <dd><a title="ErrorDocument 502" href="/e/502/">ErrorDocument Bad Gateway</a>  |  <a href="#status-502" title="Sample Bad Gateway">Sample 502 Bad Gateway</a> <br />The server was acting as a gateway or proxy and received an invalid response from the upstream server.</dd>
    <dt><a id="code-503" title="Service Unavailable">503 Service Unavailable</a> </dt>
    <dd><a title="ErrorDocument 503" href="/e/503/">ErrorDocument Service Unavailable</a>  |  <a href="#status-503" title="Sample Service Unavailable">Sample 503 Service Unavailable</a> <br />The server is currently unavailable (because it is overloaded or down for maintenance). Generally, this is a temporary state.</dd>
    <dt><a id="code-504" title="Gateway Timeout">504 Gateway Timeout</a> </dt>
    <dd><a title="ErrorDocument 504" href="/e/504/">ErrorDocument Gateway Timeout</a>  |  <a href="#status-504" title="Sample Gateway Timeout">Sample 504 Gateway Timeout</a> <br />The server was acting as a gateway or proxy and did not receive a timely request from the upstream server.</dd>
    <dt><a id="code-505" title="HTTP Version Not Supported">505 HTTP Version Not Supported</a> </dt>
    <dd><a title="ErrorDocument 505" href="/e/505/">ErrorDocument HTTP Version Not Supported</a>  |  <a href="#status-505" title="Sample HTTP Version Not Supported">Sample 505 HTTP Version Not Supported</a> <br />The server does not support the HTTP protocol version used in the request.</dd>
    <dt><a id="code-506" title="Variant Also Negotiates">506 Variant Also Negotiates</a> </dt>
    <dd><a title="ErrorDocument 506" href="/e/506/">ErrorDocument Variant Also Negotiates</a>  |  <a href="#status-506" title="Sample Variant Also Negotiates">Sample 506 Variant Also Negotiates</a> <br />(RFC 2295 ) - Transparent content negotiation for the request, results in a circular reference.</dd>
    <dt><a id="code-507" title="Insufficient Storage">507 Insufficient Storage</a> </dt>
    <dd><a title="ErrorDocument 507" href="/e/507/">ErrorDocument Insufficient Storage</a>  |  <a href="#status-507" title="Sample Insufficient Storage">Sample 507 Insufficient Storage</a> <br />(WebDAV) (RFC 4918 )</dd>
    <dt><a id="code-509" title="Bandwidth Limit Exceeded">509 Bandwidth Limit Exceeded</a> </dt>
    <dd><a title="ErrorDocument 509" href="/e/509/">ErrorDocument Bandwidth Limit Exceeded</a>  |  <a href="#status-509" title="Sample Bandwidth Limit Exceeded">Sample 509 Bandwidth Limit Exceeded</a> <br />(Apache bw/limited extension) - This status code, while used by many servers, is not specified in any RFCs.</dd>
    <dt><a id="code-510" title="Not Extended">510 Not Extended</a> </dt>
    <dd><a title="ErrorDocument 510" href="/e/510/">ErrorDocument Not Extended</a>  |  <a href="#status-510" title="Sample Not Extended">Sample 510 Not Extended</a> <br />(RFC 2774 ) - Further extensions to the request are required for the server to fulfil it.</dd>
</dl>


<h3>1xx Info / Informational</h3>
<p><code>HTTP_INFO</code> - <strong>Request received, continuing process</strong>. Indicates a provisional response, consisting only of the Status-Line and optional headers, and is terminated by an empty line.</p>
<ul>
    <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#status-100" title="Continue">100</a>  <a title="ErrorDocument 100" href="/e/100/">Continue</a>  - <code>HTTP_CONTINUE</code></li>
    <li> <a href="#status-101" title="Switching Protocols">101</a>  <a title="ErrorDocument 101" href="/e/101/">Switching Protocols</a>  - <code>HTTP_SWITCHING_PROTOCOLS</code></li>
    <li> <a href="#status-102" title="Processing">102</a>  <a title="ErrorDocument 102" href="/e/102/">Processing</a>  - <code>HTTP_PROCESSING</code></li>
</ul>


<h3>2xx Success / OK</h3>
<p><code>HTTP_SUCCESS</code> - <strong>The action was successfully received, understood, and accepted</strong>.  Indicates that the client's request was successfully received, understood, and accepted.</p>
<ul>
    <li> <a href="#status-200" title="OK">200</a>  <a title="ErrorDocument 200" href="/e/200/">OK</a>  - <code>HTTP_OK</code></li>
    <li> <a href="#status-201" title="Created">201</a>  <a title="ErrorDocument 201" href="/e/201/">Created</a>  - <code>HTTP_CREATED</code></li>
    <li> <a href="#status-202" title="Accepted">202</a>  <a title="ErrorDocument 202" href="/e/202/">Accepted</a>  - <code>HTTP_ACCEPTED</code></li>
    <li> <a href="#status-203" title="Non-Authoritative Information">203</a>  <a title="ErrorDocument 203" href="/e/203/">Non-Authoritative Information</a>  - <code>HTTP_NON_AUTHORITATIVE</code></li>
    <li> <a href="#status-204" title="No Content">204</a>  <a title="ErrorDocument 204" href="/e/204/">No Content</a>  - <code>HTTP_NO_CONTENT</code></li>
    <li> <a href="#status-205" title="Reset Content">205</a>  <a title="ErrorDocument 205" href="/e/205/">Reset Content</a>  - <code>HTTP_RESET_CONTENT</code></li>
    <li> <a href="#status-206" title="Partial Content">206</a>  <a title="ErrorDocument 206" href="/e/206/">Partial Content</a>  - <code>HTTP_PARTIAL_CONTENT</code></li>
    <li> <a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html#status-207" title="Multi-Status">207</a>  <a title="ErrorDocument 207" href="/e/207/">Multi-Status</a>  - <code>HTTP_MULTI_STATUS</code></li>
</ul>


<h3>3xx Redirect</h3>
<p><code>HTTP_REDIRECT</code> - <strong>The client must take additional action to complete the request</strong>.  Indicates that further action needs to be taken by the user-agent in order to fulfill the request. The action required may be carried out by the user agent without interaction with the user if and only if the method used in the second request is GET or HEAD. A user agent should not automatically <em>redirect a request more than 5 times</em>, since such redirections usually indicate an <strong>infinite loop</strong>.</p>
<ul>
    <li> <a href="#status-300" title="Multiple Choices">300</a>  <a title="ErrorDocument 300" href="/e/300/">Multiple Choices</a>  - <code>HTTP_MULTIPLE_CHOICES</code></li>
    <li> <a href="#status-301" title="Moved Permanently">301</a>  <a title="ErrorDocument 301" href="/e/301/">Moved Permanently</a>  - <code>HTTP_MOVED_PERMANENTLY</code></li>
    <li> <a href="#status-302" title="Found">302</a>  <a title="ErrorDocument 302" href="/e/302/">Found</a>  - <code>HTTP_MOVED_TEMPORARILY</code></li>
    <li> <a href="#status-303" title="See Other">303</a>  <a title="ErrorDocument 303" href="/e/303/">See Other</a>  - <code>HTTP_SEE_OTHER</code></li>
    <li> <a href="#status-304" title="Not Modified">304</a>  <a title="ErrorDocument 304" href="/e/304/">Not Modified</a>  - <code>HTTP_NOT_MODIFIED</code></li>
    <li> <a href="#status-305" title="Use Proxy">305</a>  <a title="ErrorDocument 305" href="/e/305/">Use Proxy</a>  - <code>HTTP_USE_PROXY</code></li>
    <li> <a href="#status-306" title="unused">306</a>  <a title="ErrorDocument 306" href="/e/306/">unused</a>  - <code>UNUSED</code></li>
    <li> <a href="#status-307" title="Temporary Redirect">307</a>  <a title="ErrorDocument 307" href="/e/307/">Temporary Redirect</a>  - <code>HTTP_TEMPORARY_REDIRECT</code></li>
</ul>


<h3>4xx Client Error</h3>
<p><code>HTTP_CLIENT_ERROR</code> - <strong>The request contains bad syntax or cannot be fulfilled</strong>.  Indicates case where client seems to have erred. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition.</p>
<ul>
    <li> <a href="#status-400" title="Bad Request">400</a>  <a title="ErrorDocument 400" href="/e/400/">Bad Request</a>  - <code>HTTP_BAD_REQUEST</code></li>
    <li> <a href="#status-401" title="Authorization Required">401</a>  <a title="ErrorDocument 401" href="/e/401/">Authorization Required</a>  - <code>HTTP_UNAUTHORIZED</code></li>
    <li> <a href="#status-402" title="Payment Required">402</a>  <a title="ErrorDocument 402" href="/e/402/">Payment Required</a>  - <code>HTTP_PAYMENT_REQUIRED</code></li>
    <li> <a href="#status-403" title="Forbidden">403</a>  <a title="ErrorDocument 403" href="/e/403/">Forbidden</a>  - <code>HTTP_FORBIDDEN</code></li>
    <li> <a href="#status-404" title="Not Found">404</a>  <a title="ErrorDocument 404" href="/e/404/">Not Found</a>  - <code>HTTP_NOT_FOUND</code></li>
    <li> <a href="#status-405" title="Method Not Allowed">405</a>  <a title="ErrorDocument 405" href="/e/405/">Method Not Allowed</a>  - <code>HTTP_METHOD_NOT_ALLOWED</code></li>
    <li> <a href="#status-406" title="Not Acceptable">406</a>  <a title="ErrorDocument 406" href="/e/406/">Not Acceptable</a>  - <code>HTTP_NOT_ACCEPTABLE</code></li>
    <li> <a href="#status-407" title="Proxy Authentication Required">407</a>  <a title="ErrorDocument 407" href="/e/407/">Proxy Authentication Required</a>  - <code>HTTP_PROXY_AUTHENTICATION_REQUIRED</code></li>
    <li> <a href="#status-408" title="Request Time-out">408</a>  <a title="ErrorDocument 408" href="/e/408/">Request Time-out</a>  - <code>HTTP_REQUEST_TIME_OUT</code></li>
    <li> <a href="#status-409" title="Conflict">409</a>  <a title="ErrorDocument 409" href="/e/409/">Conflict</a>  - <code>HTTP_CONFLICT</code></li>
    <li> <a href="#status-410" title="Gone">410</a>  <a title="ErrorDocument 410" href="/e/410/">Gone</a>  - <code>HTTP_GONE</code></li>
    <li> <a href="#status-411" title="Length Required">411</a>  <a title="ErrorDocument 411" href="/e/411/">Length Required</a>  - <code>HTTP_LENGTH_REQUIRED</code></li>
    <li> <a href="#status-412" title="Precondition Failed">412</a>  <a title="ErrorDocument 412" href="/e/412/">Precondition Failed</a>  - <code>HTTP_PRECONDITION_FAILED</code></li>
    <li> <a href="#status-413" title="Request Entity Too Large">413</a>  <a title="ErrorDocument 413" href="/e/413/">Request Entity Too Large</a>  - <code>HTTP_REQUEST_ENTITY_TOO_LARGE</code></li>
    <li> <a href="#status-414" title="Request-URI Too Large">414</a>  <a title="ErrorDocument 414" href="/e/414/">Request-URI Too Large</a>  - <code>HTTP_REQUEST_URI_TOO_LARGE</code></li>
    <li> <a href="#status-415" title="Unsupported Media Type">415</a>  <a title="ErrorDocument 415" href="/e/415/">Unsupported Media Type</a>  - <code>HTTP_UNSUPPORTED_MEDIA_TYPE</code></li>
    <li> <a href="#status-416" title="Requested Range Not Satisfiable">416</a>  <a title="ErrorDocument 416" href="/e/416/">Requested Range Not Satisfiable</a>  - <code>HTTP_RANGE_NOT_SATISFIABLE</code></li>
    <li> <a href="#status-417" title="Expectation Failed">417</a>  <a title="ErrorDocument 417" href="/e/417/">Expectation Failed</a>  - <code>HTTP_EXPECTATION_FAILED</code></li>
    <li> <a href="#status-418" title="Im a teapot">418</a>  <a title="ErrorDocument 418" href="/e/418/">I'm a teapot</a>  - <code>UNUSED</code></li>
    <li> <a href="#status-419" title="unused">419</a>  <a title="ErrorDocument 419" href="/e/419/">unused</a>  - <code>UNUSED</code></li>
    <li> <a href="#status-420" title="unused">420</a>  <a title="ErrorDocument 420" href="/e/420/">unused</a>  - <code>UNUSED</code></li>
    <li> <a href="#status-421" title="unused">421</a>  <a title="ErrorDocument 421" href="/e/421/">unused</a>  - <code>UNUSED</code></li>
    <li> <a href="#status-422" title="Unprocessable Entity">422</a>  <a title="ErrorDocument 422" href="/e/422/">Unprocessable Entity</a>  - <code>HTTP_UNPROCESSABLE_ENTITY</code></li>
    <li> <a href="#status-423" title="Locked">423</a>  <a title="ErrorDocument 423" href="/e/423/">Locked</a>  - <code>HTTP_LOCKED</code></li>
    <li> <a href="#status-424" title="Failed Dependency">424</a>  <a title="ErrorDocument 424" href="/e/424/">Failed Dependency</a>  - <code>HTTP_FAILED_DEPENDENCY</code></li>
    <li> <a href="#status-425" title="No code">425</a>  <a title="ErrorDocument 425" href="/e/425/">No code</a>  - <code>HTTP_NO_CODE</code></li>
    <li> <a href="#status-426" title="Upgrade Required">426</a>  <a title="ErrorDocument 426" href="/e/426/">Upgrade Required</a>  - <code>HTTP_UPGRADE_REQUIRED</code></li>
</ul>


<h3>5xx Server Error</h3>
<p><code>HTTP_SERVER_ERROR</code> - <strong>The server failed to fulfill an apparently valid request</strong>.  Indicate cases in which the server is aware that it has erred or is incapable of performing the request. Except when responding to a HEAD request, the server should include an entity containing an explanation of the error situation, and whether it is a temporary or permanent condition. User agents should display any included entity to the user. These response codes are applicable to any request method.</p>
<ul>
    <li> <a href="#status-500" title="Internal Server Error">500</a>  <a title="ErrorDocument 500" href="/e/500/">Internal Server Error</a>  - <code>HTTP_INTERNAL_SERVER_ERROR</code></li>
    <li> <a href="#status-501" title="Method Not Implemented">501</a>  <a title="ErrorDocument 501" href="/e/501/">Method Not Implemented</a>  - <code>HTTP_NOT_IMPLEMENTED</code></li>
    <li> <a href="#status-502" title="Bad Gateway">502</a>  <a title="ErrorDocument 502" href="/e/502/">Bad Gateway</a>  - <code>HTTP_BAD_GATEWAY</code></li>
    <li> <a href="#status-503" title="Service Temporarily Unavailable">503</a>  <a title="ErrorDocument 503" href="/e/503/">Service Temporarily Unavailable</a>  - <code>HTTP_SERVICE_UNAVAILABLE</code></li>
    <li> <a href="#status-504" title="Gateway Time-out">504</a>  <a title="ErrorDocument 504" href="/e/504/">Gateway Time-out</a>  - <code>HTTP_GATEWAY_TIME_OUT</code></li>
    <li> <a href="#status-505" title="HTTP Version Not Supported">505</a>  <a title="ErrorDocument 505" href="/e/505/">HTTP Version Not Supported</a>  - <code>HTTP_VERSION_NOT_SUPPORTED</code></li>
    <li> <a href="#status-506" title="Variant Also Negotiates">506</a>  <a title="ErrorDocument 506" href="/e/506/">Variant Also Negotiates</a>  - <code>HTTP_VARIANT_ALSO_VARIES</code></li>
    <li> <a href="#status-507" title="Insufficient Storage">507</a>  <a title="ErrorDocument 507" href="/e/507/">Insufficient Storage</a>  - <code>HTTP_INSUFFICIENT_STORAGE</code></li>
    <li> <a href="#status-508" title="unused">508</a>  <a title="ErrorDocument 508" href="/e/508/">unused</a>  - <code>UNUSED</code></li>
    <li> <a href="#status-509" title="unused">509</a>  <a title="ErrorDocument 509" href="/e/509/">unused</a>  - <code>UNUSED</code></li>
    <li> <a href="#status-510" title="Not Extended">510</a>  <a title="ErrorDocument 510" href="/e/510/">Not Extended</a>  - <code>HTTP_NOT_EXTENDED</code></li>
</ul>


<hr />


<h2> <a href="#quick-start" name="quick-start" id="quick-start">Quick Start to triggering ErrorDocuments for each Status Code</a> </h2>
<p>Let start with a quick and easy example.  Add the following Redirect rules to your htaccess file, then open your browser and goto each url like <code>yoursite.com/e/400</code>. <em>Don't create an /e/ directory or any files.</em></p>
<pre>Redirect 400 /e/400
Redirect 503 /e/503
Redirect 405 /e/405</pre>
<p> <a href="http://uploads.askapache.com/2007/03/error-400s.png" title="Apache ErrorDocument Results" rel="lb"><img src="http://uploads.askapache.com/2007/03/error-400s.thumbnail.png" alt="Apache ErrorDocument Results" title="error 400s.thumbnail htaccess" /></a> <br /> <a href="http://uploads.askapache.com/2007/03/error-503.png" title="error 503" rel="lb"><img src="http://uploads.askapache.com/2007/03/error-503.thumbnail.png" alt="error 503" title="error 503.thumbnail htaccess" /></a> </p>


<h2> <a href="#automating-the-process" name="automating-the-process" id="automating-the-process">Automate the ErrorDocument Triggering</a> </h2>


<h3> <a href="#redirect-code-in-htaccess" name="redirect-code-in-htaccess" id="redirect-code-in-htaccess">The htaccess Redirects</a> </h3>
<p>When a Status code is encountered, Apache outputs the Header and the ErrorDocument for that error code.  So you can view any Header and the default ErrorDocument, by causing that numerical error code, which is caused by the Status Code.</p>
<p>For instance, if you request a file that doesn't exist, a <strong>404 Not Found</strong> Header is issued and the corresponding ErrorDocument is served with the <strong>404 Not Found</strong> Header.</p>
<pre>Redirect 100 /e/100
Redirect 101 /e/101
Redirect 102 /e/102
Redirect 200 /e/200
Redirect 201 /e/201
Redirect 202 /e/202
Redirect 203 /e/203
Redirect 204 /e/204
Redirect 205 /e/205
Redirect 206 /e/206
Redirect 207 /e/207
Redirect 300 /e/300 http://www.askapache.com/?s=300
Redirect 301 /e/301 http://www.askapache.com/?s=301
Redirect 302 /e/302 http://www.askapache.com/?s=302
Redirect 303 /e/303 http://www.askapache.com/?s=303
Redirect 304 /e/304 http://www.askapache.com/?s=304
Redirect 305 /e/305 http://www.askapache.com/?s=305
Redirect 306 /e/306 http://www.askapache.com/?s=306
Redirect 307 /e/307 http://www.askapache.com/?s=307
Redirect 400 /e/400
Redirect 401 /e/401
Redirect 402 /e/402
Redirect 403 /e/403
Redirect 404 /e/404
Redirect 405 /e/405
Redirect 406 /e/406
Redirect 407 /e/407
Redirect 408 /e/408
Redirect 409 /e/409
Redirect 410 /e/410
Redirect 411 /e/411
Redirect 412 /e/412
Redirect 413 /e/413
Redirect 414 /e/414
Redirect 415 /e/415
Redirect 416 /e/416
Redirect 417 /e/417
Redirect 418 /e/418
Redirect 419 /e/419
Redirect 420 /e/420
Redirect 421 /e/421
Redirect 422 /e/422
Redirect 423 /e/423
Redirect 424 /e/424
Redirect 425 /e/425
Redirect 426 /e/426
Redirect 500 /e/500
Redirect 501 /e/501
Redirect 502 /e/502
Redirect 503 /e/503
Redirect 504 /e/504
Redirect 505 /e/505
Redirect 506 /e/506
Redirect 507 /e/507
Redirect 508 /e/508
Redirect 509 /e/509
Redirect 510 /e/510</pre>


<h3> <a href="#php-header-grabber-script" name="php-header-grabber-script" id="php-header-grabber-script">PHP script that gets and outputs the Headers/Content</a> </h3>
<p>Now all I have to do is add 57 Redirect Directives to my htaccess, and then request each of them 1 at a time from my browser to see the result, and use a packet sniffing program like  <a href="http://wireshark.askapache.com">WireShark</a>  to see the Headers.  Uh, scratch that, that would take way too long!</p>
<p>Instead I hacked up a simple php script using  <a href="http://www.askapache.com/phpbb/sending-post-form-data-with-php-curl.html">cURL</a>  to automate sending GET Requests to each of the 57 Redirect URL-paths. A side benefit of using the php script is that it performs all 57 Requests concurrently and saves each Requests returned headers and content to an output buffer.  After all 57 have been queried, the output buffer is flushed to the browser.</p>
<pre>&lt;?php
$SITENAME=&#039;http://www.askapache.com&#039;;
&nbsp;
$CODES = array(array(&#039;100&#039;,&#039;101&#039;,&#039;102&#039;),
array(&#039;200&#039;,&#039;201&#039;,&#039;202&#039;,&#039;203&#039;,&#039;204&#039;,&#039;205&#039;,&#039;206&#039;,&#039;207&#039;),
array(&#039;300&#039;,&#039;301&#039;,&#039;302&#039;,&#039;303&#039;,&#039;304&#039;,&#039;305&#039;,&#039;306&#039;,&#039;307&#039;),
array(&#039;400&#039;,&#039;401&#039;,&#039;402&#039;,&#039;403&#039;,&#039;404&#039;,&#039;405&#039;,&#039;406&#039;,&#039;407&#039;,&#039;408&#039;,&#039;409&#039;,&#039;410&#039;,&#039;411&#039;,&#039;412&#039;,&#039;413&#039;,
&#039;414&#039;,&#039;415&#039;,&#039;416&#039;,&#039;417&#039;,&#039;418&#039;,&#039;419&#039;,&#039;420&#039;,&#039;421&#039;,&#039;422&#039;,&#039;423&#039;,&#039;424&#039;,&#039;425&#039;,&#039;426&#039;),
array(&#039;500&#039;,&#039;501&#039;,&#039;502&#039;,&#039;503&#039;,&#039;504&#039;,&#039;505&#039;,&#039;506&#039;,&#039;507&#039;,&#039;508&#039;,&#039;509&#039;,&#039;510&#039;));
&nbsp;
$TMPSAVETO=&#039;/tmp/&#039;.time().&#039;.txt&#039;;
&nbsp;
# if file exists then delete it
if(is_file($TMPSAVETO))unlink($TMPSAVETO);
&nbsp;
foreach($CODES as $keyd =&gt; $res)
{
foreach($res as $key)
{
$ch = curl_init("$SITENAME/e/$key");
$fp = fopen ($TMPSAVETO, "a");
curl_setopt ($ch, CURLOPT_FILE, $fp);
curl_setopt ($ch, CURLOPT_FOLLOWLOCATION ,1);
curl_setopt ($ch, CURLOPT_HEADER ,1);
curl_exec ($ch);
curl_close ($ch);
fclose ($fp);
}
}
$OUT=&#039;&#039;;
ob_start();
header ("Content-Type: text/plain;");
readfile($TMPSAVETO);
$OUT=ob_get_clean();
echo $OUT;
unlink($TMPSAVETO);
exit;
?&gt;</pre>


<h2> <a href="#headers-returned-content" id="headers-returned-content">Headers and Content Returned</a> </h2>


<h3> <a href="#status-100" name="status-100" id="status-100">100 Continue</a> </h3>
<pre>HTTP/1.1 100 Continue
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;100 Continue&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Continue&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-101" name="status-101" id="status-101">101 Switching Protocols</a> </h3>
<pre>HTTP/1.1 101 Switching Protocols&lt;html&gt;
&lt;head&gt;
&lt;title&gt;101 Switching Protocols&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Switching Protocols&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-102" name="status-102" id="status-102">102 Processing</a> </h3>
<pre>HTTP/1.1 102 Processing
X-Pad: avoid browser bug&lt;html&gt;
&lt;head&gt;
&lt;title&gt;102 Processing&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Processing&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-200" name="status-200" id="status-200">200 OK</a> </h3>
<pre>HTTP/1.1 200 OK
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;200 OK&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;OK&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-201" name="status-201" id="status-201">201 Created</a> </h3>
<pre>HTTP/1.1 201 Created
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;201 Created&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Created&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-202" name="status-202" id="status-202">202 Accepted</a> </h3>
<pre>HTTP/1.1 202 Accepted
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;202 Accepted&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Accepted&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-203" name="status-203" id="status-203">203 Non-Authoritative Information</a> </h3>
<pre>HTTP/1.1 203 Non-Authoritative Information
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;203 Non-Authoritative Information&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Non-Authoritative Information&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-204" name="status-204" id="status-204">204 No Content</a> </h3>
<pre>HTTP/1.1 204 No Content
Content-Type: text/plain; charset=UTF-8
</pre>


<h3> <a href="#status-205" name="status-205" id="status-205">205 Reset Content</a> </h3>
<pre>HTTP/1.1 205 Reset Content&lt;html&gt;
&lt;head&gt;
&lt;title&gt;205 Reset Content&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Reset Content&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-206" name="status-206" id="status-206">206 Partial Content</a> </h3>
<pre>HTTP/1.1 206 Partial Content&lt;html&gt;
&lt;head&gt;
&lt;title&gt;206 Partial Content&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Partial Content&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-207" name="status-207" id="status-207">207 Multi-Status</a> </h3>
<pre>HTTP/1.1 207 Multi-Status
X-Pad: avoid browser bug&lt;html&gt;
&lt;head&gt;
&lt;title&gt;207 Multi-Status&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Multi-Status&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-300" name="status-300" id="status-300">300 Multiple Choices</a> </h3>
<pre>HTTP/1.1 300 Multiple Choices
Location: http://www.askapache.com/?s=300&lt;html&gt;
&lt;head&gt;
&lt;title&gt;300 Multiple Choices&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Multiple Choices&lt;/h1&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-301" name="status-301" id="status-301">301 Moved Permanently</a> </h3>
<pre>HTTP/1.1 301 Moved Permanently
Location: http://www.askapache.com/?s=301&lt;html&gt;
&lt;head&gt;
&lt;title&gt;301 Moved Permanently&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Moved Permanently&lt;/h1&gt;
&lt;p&gt;The document has moved  &lt;a href="http://www.askapache.com/?s=301"&gt;here&lt;/a&gt; .&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-302" name="status-302" id="status-302">302 Found</a> </h3>
<pre>HTTP/1.1 302 Found
Location: http://www.askapache.com/?s=302&lt;html&gt;
&lt;head&gt;
&lt;title&gt;302 Found&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Found&lt;/h1&gt;
&lt;p&gt;The document has moved  &lt;a href="http://www.askapache.com/?s=302"&gt;here&lt;/a&gt; .&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-303" name="status-303" id="status-303">303 See Other</a> </h3>
<pre>HTTP/1.1 303 See Other
Location: http://www.askapache.com/?s=303&lt;html&gt;
&lt;head&gt;
&lt;title&gt;303 See Other&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;See Other&lt;/h1&gt;
&lt;p&gt;The answer to your request is located  &lt;a href="http://www.askapache.com/?s=303"&gt;here&lt;/a&gt; .&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-304" name="status-304" id="status-304">304 Not Modified</a> </h3>
<pre>HTTP/1.1 304 Not Modified</pre>


<h3> <a href="#status-305" name="status-305" id="status-305">305 Use Proxy</a> </h3>
<pre>HTTP/1.1 305 Use Proxy
Location: http://www.askapache.com/?s=305&lt;html&gt;
&lt;head&gt;
&lt;title&gt;305 Use Proxy&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Use Proxy&lt;/h1&gt;
&lt;p&gt;This resource is only accessible through the proxy
    http://www.askapache.com/?s=305&lt;br /&gt;You will need to configure your client to use that proxy.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-306" name="status-306" id="status-306">306 unused</a> </h3>
<pre>HTTP/1.1 306 unused
Location: http://www.askapache.com/?s=306&lt;html&gt;
&lt;head&gt;
&lt;title&gt;306 unused&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;unused&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-307" name="status-307" id="status-307">307 Temporary Redirect</a> </h3>
<pre>HTTP/1.1 307 Temporary Redirect
Location: http://www.askapache.com/?s=307&lt;html&gt;
&lt;head&gt;
&lt;title&gt;307 Temporary Redirect&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Temporary Redirect&lt;/h1&gt;
&lt;p&gt;The document has moved  &lt;a href="http://www.askapache.com/?s=307"&gt;here&lt;/a&gt; .&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-400" name="status-400" id="status-400">400 Bad Request</a> </h3>
<pre>HTTP/1.1 400 Bad Request
Connection: close&lt;html&gt;
&lt;head&gt;
&lt;title&gt;400 Bad Request&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Bad Request&lt;/h1&gt;
&lt;p&gt;Your browser sent a request that this server could not understand.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-401" name="status-401" id="status-401">401 Authorization Required</a> </h3>
<pre>HTTP/1.1 401 Authorization Required&lt;html&gt;
&lt;head&gt;
&lt;title&gt;401 Authorization Required&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Authorization Required&lt;/h1&gt;
&lt;p&gt;This server could not verify that you
    are authorized to access the document
    requested.  Either you supplied the wrong
    credentials (e.g., bad password), or your
    browser doesn&#039;t understand how to supply
    the credentials required.&lt;/p&gt;
&lt;p&gt;Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-402" name="status-402" id="status-402">402 Payment Required</a> </h3>
<pre>HTTP/1.1 402 Payment Required&lt;html&gt;
&lt;head&gt;
&lt;title&gt;402 Payment Required&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Payment Required&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-403" name="status-403" id="status-403">403 Forbidden</a> </h3>
<pre>HTTP/1.1 403 Forbidden&lt;html&gt;
&lt;head&gt;
&lt;title&gt;403 Forbidden&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Forbidden&lt;/h1&gt;
&lt;p&gt;You don&#039;t have permission to access /e/403
    on this server.&lt;/p&gt;
&lt;p&gt;Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-404" name="status-404" id="status-404">404 Not Found</a> </h3>
<pre>HTTP/1.1 404 Not Found&lt;html&gt;
&lt;head&gt;
&lt;title&gt;404 Not Found&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Not Found&lt;/h1&gt;
&lt;p&gt;The requested URL /e/404 was not found on this server.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>
<p class="anote"><span>NOTE:</span><br />You will most definately want to check out and use the <a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html" title="404 Error Page WordPress Plugin">Google 404 Error Page</a> if you run WordPress.</p>


<h3> <a href="#status-405" name="status-405" id="status-405">405 Method Not Allowed</a> </h3>
<pre>HTTP/1.1 405 Method Not Allowed
Allow: TRACE
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;405 Method Not Allowed&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Method Not Allowed&lt;/h1&gt;
&lt;p&gt;The requested method GET is not allowed for the URL /e/405.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-406" name="status-406" id="status-406">406 Not Acceptable</a> </h3>
<pre>HTTP/1.1 406 Not Acceptable
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;406 Not Acceptable&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Not Acceptable&lt;/h1&gt;
&lt;p&gt;An appropriate representation of the requested resource /e/406 could not be found on this server.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-407" name="status-407" id="status-407">407 Proxy Authentication Required</a> </h3>
<pre>HTTP/1.1 407 Proxy Authentication Required&lt;html&gt;
&lt;head&gt;
&lt;title&gt;407 Proxy Authentication Required&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Proxy Authentication Required&lt;/h1&gt;
&lt;p&gt;This server could not verify that you
    are authorized to access the document
    requested.  Either you supplied the wrong
    credentials (e.g., bad password), or your
    browser doesn&#039;t understand how to supply
    the credentials required.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-408" name="status-408" id="status-408">408 Request Time-out</a> </h3>
<pre>HTTP/1.1 408 Request Time-out
Connection: close
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;408 Request Time-out&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Request Time-out&lt;/h1&gt;
&lt;p&gt;Server timeout waiting for the HTTP request from the client.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-409" name="status-409" id="status-409">409 Conflict</a> </h3>
<pre>HTTP/1.1 409 Conflict
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;409 Conflict&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Conflict&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-410" name="status-410" id="status-410">410 Gone</a> </h3>
<pre>HTTP/1.1 410 Gone
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;410 Gone&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Gone&lt;/h1&gt;
&lt;p&gt;The requested resource&lt;br /&gt;/e/410&lt;br /&gt;is no longer available on this server and there is no forwarding address.
    Please remove all references to this resource.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-411" name="status-411" id="status-411">411 Length Required</a> </h3>
<pre>HTTP/1.1 411 Length Required
Connection: close
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;411 Length Required&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Length Required&lt;/h1&gt;
&lt;p&gt;A request of the requested method GET requires a valid Content-length.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-412" name="status-412" id="status-412">412 Precondition Failed</a> </h3>
<pre>HTTP/1.1 412 Precondition Failed
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;412 Precondition Failed&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Precondition Failed&lt;/h1&gt;
&lt;p&gt;The precondition on the request for the URL /e/412 evaluated to false.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-413" name="status-413" id="status-413">413 Request Entity Too Large</a> </h3>
<pre>HTTP/1.1 413 Request Entity Too Large
Connection: close&lt;html&gt;
&lt;head&gt;
&lt;title&gt;413 Request Entity Too Large&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Request Entity Too Large&lt;/h1&gt;
The requested resource&lt;br /&gt;/e/413&lt;br /&gt;does not allow request data with GET requests, or the amount of data provided in
the request exceeds the capacity limit.
&lt;/body&gt;
&lt;/html&gt;</pre>

<h3> <a href="#status-414" name="status-414" id="status-414">414 Request-URI Too Large</a> </h3>
<pre>HTTP/1.1 414 Request-URI Too Large
Connection: close&lt;html&gt;
&lt;head&gt;
&lt;title&gt;414 Request-URI Too Large&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Request-URI Too Large&lt;/h1&gt;
&lt;p&gt;The requested URL&#039;s length exceeds the capacity
    limit for this server.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-415" name="status-415" id="status-415">415 Unsupported Media Type</a> </h3>
<pre>HTTP/1.1 415 Unsupported Media Type&lt;html&gt;
&lt;head&gt;
&lt;title&gt;415 Unsupported Media Type&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Unsupported Media Type&lt;/h1&gt;
&lt;p&gt;The supplied request data is not in a format
    acceptable for processing by this resource.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-416" name="status-416" id="status-416">416 Requested Range Not Satisfiable</a> </h3>
<pre>HTTP/1.1 416 Requested Range Not Satisfiable</pre>


<h3> <a href="#status-417" name="status-417" id="status-417">417 Expectation Failed</a> </h3>
<pre>HTTP/1.1 417 Expectation Failed&lt;html&gt;
&lt;head&gt;
&lt;title&gt;417 Expectation Failed&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Expectation Failed&lt;/h1&gt;
&lt;p&gt;The expectation given in the Expect request-header
    field could not be met by this server.&lt;/p&gt;
&lt;p&gt;The client sent&lt;pre&gt;
    Expect: &lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-418" name="status-418" id="status-418">418 I'm a teapot</a> </h3>
<pre>HTTP/1.1 418 I&#039;m a teapot&lt;html&gt;
&lt;head&gt;
&lt;title&gt;418 I&#039;m a teapot&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;I&#039;m a teapot&lt;/h1&gt;
&lt;p&gt;Unfortunately this coffee machine is out of coffee.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-419" name="status-419" id="status-419">419 unused</a> </h3>
<pre>HTTP/1.1 419 unused&lt;html&gt;
&lt;head&gt;
&lt;title&gt;419 unused&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;unused&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-420" name="status-420" id="status-420">420 unused</a> </h3>
<pre>HTTP/1.1 420 unused&lt;html&gt;
&lt;head&gt;
&lt;title&gt;420 unused&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;unused&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-421" name="status-421" id="status-421">421 unused</a> </h3>
<pre>HTTP/1.1 421 unused&lt;html&gt;
&lt;head&gt;
&lt;title&gt;421 unused&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;unused&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-422" name="status-422" id="status-422">422 Unprocessable Entity</a> </h3>
<pre>HTTP/1.1 422 Unprocessable Entity&lt;html&gt;
&lt;head&gt;
&lt;title&gt;422 Unprocessable Entity&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Unprocessable Entity&lt;/h1&gt;
&lt;p&gt;The server understands the media type of the
    request entity, but was unable to process the
    contained instructions.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-423" name="status-423" id="status-423">423 Locked</a> </h3>
<pre>HTTP/1.1 423 Locked&lt;html&gt;
&lt;head&gt;
&lt;title&gt;423 Locked&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Locked&lt;/h1&gt;
&lt;p&gt;The requested resource is currently locked.
    The lock must be released or proper identification
    given before the method can be applied.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-424" name="status-424" id="status-424">424 Failed Dependency</a> </h3>
<pre>HTTP/1.1 424 Failed Dependency&lt;html&gt;
&lt;head&gt;
&lt;title&gt;424 Failed Dependency&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Failed Dependency&lt;/h1&gt;
&lt;p&gt;The method could not be performed on the resource
    because the requested action depended on another
    action and that other action failed.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-425" name="status-425" id="status-425">425 No code</a> </h3>
<pre>HTTP/1.1 425 No code&lt;html&gt;
&lt;head&gt;
&lt;title&gt;425 No code&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;No code&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-426" name="status-426" id="status-426">426 Upgrade Required</a> </h3>
<pre>HTTP/1.1 426 Upgrade Required&lt;html&gt;
&lt;head&gt;
&lt;title&gt;426 Upgrade Required&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Upgrade Required&lt;/h1&gt;
&lt;p&gt;The requested resource can only be retrieved
    using SSL.  The server is willing to upgrade the current
    connection to SSL, but your client doesn&#039;t support it.
    Either upgrade your client, or try requesting the page
    using https:// &lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-500" name="status-500" id="status-500">500 Internal Server Error</a> </h3>
<pre>HTTP/1.1 500 Internal Server Error
Connection: close&lt;html&gt;
&lt;head&gt;
&lt;title&gt;500 Internal Server Error&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Internal Server Error&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;p&gt;Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-501" name="status-501" id="status-501">501 Method Not Implemented</a> </h3>
<pre>HTTP/1.1 501 Method Not Implemented
Allow: TRACE
Connection: close&lt;html&gt;
&lt;head&gt;
&lt;title&gt;501 Method Not Implemented&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Method Not Implemented&lt;/h1&gt;
&lt;p&gt;GET to /e/501 not supported.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-502" name="status-502" id="status-502">502 Bad Gateway</a> </h3>
<pre>HTTP/1.1 502 Bad Gateway
X-Pad: avoid browser bug&lt;html&gt;
&lt;head&gt;
&lt;title&gt;502 Bad Gateway&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Bad Gateway&lt;/h1&gt;
&lt;p&gt;The proxy server received an invalid
    response from an upstream server.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-503" name="status-503" id="status-503">503 Service Temporarily Unavailable</a> </h3>
<pre>HTTP/1.1 503 Service Temporarily Unavailable
Connection: close&lt;html&gt;
&lt;head&gt;
&lt;title&gt;503 Service Temporarily Unavailable&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Service Temporarily Unavailable&lt;/h1&gt;
&lt;p&gt;The server is temporarily unable to service your
    request due to maintenance downtime or capacity
    problems. Please try again later.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-504" name="status-504" id="status-504">504 Gateway Time-out</a> </h3>
<pre>HTTP/1.1 504 Gateway Time-out&lt;html&gt;
&lt;head&gt;
&lt;title&gt;504 Gateway Time-out&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Gateway Time-out&lt;/h1&gt;
&lt;p&gt;The proxy server did not receive a timely response
    from the upstream server.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-505" name="status-505" id="status-505">505 HTTP Version Not Supported</a> </h3>
<pre>HTTP/1.1 505 HTTP Version Not Supported&lt;html&gt;
&lt;head&gt;
&lt;title&gt;505 HTTP Version Not Supported&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;HTTP Version Not Supported&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-506" name="status-506" id="status-506">506 Variant Also Negotiates</a> </h3>
<pre>HTTP/1.1 506 Variant Also Negotiates&lt;html&gt;
&lt;head&gt;
&lt;title&gt;506 Variant Also Negotiates&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Variant Also Negotiates&lt;/h1&gt;
&lt;p&gt;A variant for the requested resource
    &lt;pre&gt;
    /e/506
    &lt;/pre&gt;
    is itself a negotiable resource. This indicates a configuration error.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-507" name="status-507" id="status-507">507 Insufficient Storage</a> </h3>
<pre>HTTP/1.1 507 Insufficient Storage&lt;html&gt;
&lt;head&gt;
&lt;title&gt;507 Insufficient Storage&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Insufficient Storage&lt;/h1&gt;
&lt;p&gt;The method could not be performed on the resource
    because the server is unable to store the
    representation needed to successfully complete the
    request.  There is insufficient free space left in
    your storage allocation.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-508" name="status-508" id="status-508">508 unused</a> </h3>
<pre>HTTP/1.1 508 unused&lt;html&gt;
&lt;head&gt;
&lt;title&gt;508 unused&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;unused&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-509" name="status-509" id="status-509">509 unused</a> </h3>
<pre>HTTP/1.1 509 unused
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;509 unused&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;unused&lt;/h1&gt;
&lt;p&gt;The server encountered an internal error or misconfigurationand was unable to complete your request.&lt;/p&gt;
&lt;p&gt;Please contact the server administrator, a@s.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.&lt;/p&gt;
&lt;p&gt;More information about this error may be available in the server error log.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h3> <a href="#status-510" name="status-510" id="status-510">510 Not Extended</a> </h3>
<pre>HTTP/1.1 510 Not Extended
X-Pad: avoid browser bug
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;510 Not Extended&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;
&lt;h1&gt;Not Extended&lt;/h1&gt;
&lt;p&gt;A mandatory extension policy in the request is not
    accepted by the server for this resource.&lt;/p&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>


<h2> <a href="#apache-source-code" name="apache-source-code" id="apache-source-code">Apache Source Code</a> </h2>


<h3> <a href="#httpdh-h" name="httpdh-h" id="httpdh-h">httpd.h</a> </h3>
<p>From <a href="http://uploads.askapache.com/2007/02/httpd.h" title="httpd.h Apache">httpd.h</a> </p>
<pre>/**
* The size of the static array in http_protocol.c for storing
* all of the potential response status-lines (a sparse table).
* A future version should dynamically generate the apr_table_t at startup.
*/
#define RESPONSE_CODES 57
#define HTTP_CONTINUE            100
#define HTTP_SWITCHING_PROTOCOLS       101
#define HTTP_PROCESSING          102
#define HTTP_OK              200
#define HTTP_CREATED             201
#define HTTP_ACCEPTED            202
#define HTTP_NON_AUTHORITATIVE       203
#define HTTP_NO_CONTENT          204
#define HTTP_RESET_CONTENT         205
#define HTTP_PARTIAL_CONTENT         206
#define HTTP_MULTI_STATUS          207
#define HTTP_MULTIPLE_CHOICES        300
#define HTTP_MOVED_PERMANENTLY       301
&nbsp;
#define HTTP_MOVED_TEMPORARILY       302
#define HTTP_SEE_OTHER           303
#define HTTP_NOT_MODIFIED          304
#define HTTP_USE_PROXY           305
#define HTTP_TEMPORARY_REDIRECT      307
#define HTTP_BAD_REQUEST           400
#define HTTP_UNAUTHORIZED          401
#define HTTP_PAYMENT_REQUIRED        402
#define HTTP_FORBIDDEN           403
#define HTTP_NOT_FOUND           404
#define HTTP_METHOD_NOT_ALLOWED      405
#define HTTP_NOT_ACCEPTABLE        406
#define HTTP_PROXY_AUTHENTICATION_REQUIRED 407
#define HTTP_REQUEST_TIME_OUT        408
#define HTTP_CONFLICT            409
#define HTTP_GONE              410
#define HTTP_LENGTH_REQUIRED         411
#define HTTP_PRECONDITION_FAILED       412
#define HTTP_REQUEST_ENTITY_TOO_LARGE    413
#define HTTP_REQUEST_URI_TOO_LARGE     414
#define HTTP_UNSUPPORTED_MEDIA_TYPE    415
#define HTTP_RANGE_NOT_SATISFIABLE     416
#define HTTP_EXPECTATION_FAILED      417
#define HTTP_UNPROCESSABLE_ENTITY      422
#define HTTP_LOCKED            423
#define HTTP_FAILED_DEPENDENCY       424
#define HTTP_UPGRADE_REQUIRED        426
#define HTTP_INTERNAL_SERVER_ERROR     500
#define HTTP_NOT_IMPLEMENTED         501
#define HTTP_BAD_GATEWAY           502
#define HTTP_SERVICE_UNAVAILABLE       503
#define HTTP_GATEWAY_TIME_OUT        504
#define HTTP_VERSION_NOT_SUPPORTED     505
#define HTTP_VARIANT_ALSO_VARIES       506
#define HTTP_INSUFFICIENT_STORAGE      507
#define HTTP_NOT_EXTENDED          510
&nbsp;
/** is the status code informational */
#define ap_is_HTTP_INFO(x)     (((x) &gt;= 100)&amp;&amp;((x) &lt; 200))
/** is the status code OK ?*/
#define ap_is_HTTP_SUCCESS(x)    (((x) &gt;= 200)&amp;&amp;((x) &lt; 300))
/** is the status code a redirect */
#define ap_is_HTTP_REDIRECT(x)   (((x) &gt;= 300)&amp;&amp;((x) &lt; 400))
/** is the status code a error (client or server) */
#define ap_is_HTTP_ERROR(x)    (((x) &gt;= 400)&amp;&amp;((x) &lt; 600))
/** is the status code a client error  */
#define ap_is_HTTP_CLIENT_ERROR(x) (((x) &gt;= 400)&amp;&amp;((x) &lt; 500))
/** is the status code a server error  */
#define ap_is_HTTP_SERVER_ERROR(x) (((x) &gt;= 500)&amp;&amp;((x) &lt; 600))
/** is the status code a (potentially) valid response code?  */
#define ap_is_HTTP_VALID_RESPONSE(x) (((x) &gt;= 100)&amp;&amp;((x) &lt; 600))
&nbsp;
/** should the status code drop the connection */
#define ap_status_drops_connection(x) \
(((x) == HTTP_BAD_REQUEST)       || \
((x) == HTTP_REQUEST_TIME_OUT)    || \
((x) == HTTP_LENGTH_REQUIRED)     || \
((x) == HTTP_REQUEST_ENTITY_TOO_LARGE) || \
((x) == HTTP_REQUEST_URI_TOO_LARGE) || \
((x) == HTTP_INTERNAL_SERVER_ERROR) || \
((x) == HTTP_SERVICE_UNAVAILABLE) || \
((x) == HTTP_NOT_IMPLEMENTED))</pre>


<h4>HTTP_INFO</h4>
<p><strong>Is the status code (x) informational?</strong></p>
<pre>x &gt;= 100 &amp;&amp; x &lt; 200</pre>


<h4>HTTP_SUCCESS</h4>
<p><strong>Is the status code (x) OK?</strong></p>
<pre>x &gt;= 200 &amp;&amp; x &lt; 300</pre>


<h4>HTTP_REDIRECT</h4>
<p><strong>Is the status code (x) a redirect?</strong></p>
<pre>x &gt;= 300 &amp;&amp; x &lt; 400</pre>


<h4>HTTP_ERROR</h4>
<p><strong>Is the status code (x) a error (client or server)?</strong></p>
<pre>x &gt;= 400 &amp;&amp; x &lt; 600</pre>


<h4>HTTP_CLIENT_ERROR</h4>
<p><strong>Is the status code (x) a client error?</strong></p>
<pre>x &gt;= 400 &amp;&amp; x &lt; 500</pre>


<h4>HTTP_SERVER_ERROR</h4>
<p><strong>Is the status code (x) a server error?</strong></p>
<pre>x &gt;= 500 &amp;&amp; x &lt; 600</pre>


<h4>HTTP_VALID_RESPONSE</h4>
<p><strong>Is the status code (x) a (potentially) valid response code?</strong></p>
<pre>x &gt;= 100 &amp;&amp; x &lt; 600</pre>


<h3> <a href="#http_protocol-c" name="http_protocol-c" id="http_protocol-c">http_protocol.c</a> </h3>
<p>From <a href="http://uploads.askapache.com/2007/02/http_protocol.c" title="http_protocol.c">http_protocol.c</a> </p>
<pre>static const char * status_lines[RESPONSE_CODES] =
static const char * const status_lines[RESPONSE_CODES] =
"100 Continue",
"101 Switching Protocols",
"102 Processing",
"200 OK",
"201 Created",
"202 Accepted",
"203 Non-Authoritative Information",
"204 No Content",
"205 Reset Content",
"206 Partial Content",
"207 Multi-Status",
"300 Multiple Choices",
"301 Moved Permanently",
"302 Found",
"303 See Other",
"304 Not Modified",
"305 Use Proxy",
"306 unused",
"307 Temporary Redirect",
"400 Bad Request",
"401 Authorization Required",
"402 Payment Required",
"403 Forbidden",
"404 Not Found",
"405 Method Not Allowed",
"406 Not Acceptable",
"407 Proxy Authentication Required",
"408 Request Time-out",
"409 Conflict",
"410 Gone",
"411 Length Required",
"412 Precondition Failed",
"413 Request Entity Too Large",
"414 Request-URI Too Large",
"415 Unsupported Media Type",
"416 Requested Range Not Satisfiable",
"417 Expectation Failed",
"418 unused",
"419 unused",
"420 unused",
"421 unused",
"422 Unprocessable Entity",
"423 Locked",
"424 Failed Dependency",
"425 No code",
"426 Upgrade Required",
"500 Internal Server Error",
"501 Method Not Implemented",
"502 Bad Gateway",
"503 Service Temporarily Unavailable",
"504 Gateway Time-out",
"505 HTTP Version Not Supported",
"506 Variant Also Negotiates",
"507 Insufficient Storage",
"508 unused",
"509 unused",
"510 Not Extended"</pre>


<h2>IANA HTTP Status Code Registry</h2>
<table cellpadding="3" cellspacing="0">
    <thead>
        <tr>
            <th>Value</th>
            <th>Description</th>
            <th>Reference</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>100</td>
            <td>Continue</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.1.1">Section 10.1.1</a> </td>
        </tr>
        <tr>
            <td>101</td>
            <td>Switching Protocols</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.1.2">Section 10.1.2</a> </td>
        </tr>
        <tr>
            <td>102</td>
            <td>Processing</td>
            <td> <a href="#RFC2518"><cite title="HTTP Extensions for Distributed Authoring -- WEBDAV">[RFC2518]</cite></a> , <a href="http://rfc.askapache.com/rfc2518#section-10.1">Section 10.1</a> </td>
        </tr>
        <tr>
            <td>200</td>
            <td>OK</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.2.1">Section 10.2.1</a> </td>
        </tr>
        <tr>
            <td>201</td>
            <td>Created</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.2.2">Section 10.2.2</a> </td>
        </tr>
        <tr>
            <td>202</td>
            <td>Accepted</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.2.3">Section 10.2.3</a> </td>
        </tr>
        <tr>
            <td>203</td>
            <td>Non-Authoritative Information</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.2.4">Section 10.2.4</a> </td>
        </tr>
        <tr>
            <td>204</td>
            <td>No Content</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.2.5">Section 10.2.5</a> </td>
        </tr>
        <tr>
            <td>205</td>
            <td>Reset Content</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.2.6">Section 10.2.6</a> </td>
        </tr>
        <tr>
            <td>206</td>
            <td>Partial Content</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.2.7">Section 10.2.7</a> </td>
        </tr>
        <tr>
            <td>207</td>
            <td>Multi-Status</td>
            <td> <a href="#RFC4918"><cite title="HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)">[RFC4918]</cite></a> , <a href="http://rfc.askapache.com/rfc4918#section-11.1">Section 11.1</a> </td>
        </tr>
        <tr>
            <td>226</td>
            <td>IM Used</td>
            <td> <a href="#RFC3229"><cite title="Delta encoding in HTTP">[RFC3229]</cite></a> , <a href="http://rfc.askapache.com/rfc3229#section-10.4.1">Section 10.4.1</a> </td>
        </tr>
        <tr>
            <td>300</td>
            <td>Multiple Choices</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.3.1">Section 10.3.1</a> </td>
        </tr>
        <tr>
            <td>301</td>
            <td>Moved Permanently</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.3.2">Section 10.3.2</a> </td>
        </tr>
        <tr>
            <td>302</td>
            <td>Found</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.3.3">Section 10.3.3</a> </td>
        </tr>
        <tr>
            <td>303</td>
            <td>See Other</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.3.4">Section 10.3.4</a> </td>
        </tr>
        <tr>
            <td>304</td>
            <td>Not Modified</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.3.5">Section 10.3.5</a> </td>
        </tr>
        <tr>
            <td>305</td>
            <td>Use Proxy</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.3.6">Section 10.3.6</a> </td>
        </tr>
        <tr>
            <td>306</td>
            <td>(Reserved)</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.3.7">Section 10.3.7</a> </td>
        </tr>
        <tr>
            <td>307</td>
            <td>Temporary Redirect</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.3.8">Section 10.3.8</a> </td>
        </tr>
        <tr>
            <td>400</td>
            <td>Bad Request</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.1">Section 10.4.1</a> </td>
        </tr>
        <tr>
            <td>401</td>
            <td>Unauthorized</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.2">Section 10.4.2</a> </td>
        </tr>
        <tr>
            <td>402</td>
            <td>Payment Required</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.3">Section 10.4.3</a> </td>
        </tr>
        <tr>
            <td>403</td>
            <td>Forbidden</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.4">Section 10.4.4</a> </td>
        </tr>
        <tr>
            <td>404</td>
            <td>Not Found</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.5">Section 10.4.5</a> </td>
        </tr>
        <tr>
            <td>405</td>
            <td>Method Not Allowed</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.6">Section 10.4.6</a> </td>
        </tr>
        <tr>
            <td>406</td>
            <td>Not Acceptable</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.7">Section 10.4.7</a> </td>
        </tr>
        <tr>
            <td>407</td>
            <td>Proxy Authentication Required</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.8">Section 10.4.8</a> </td>
        </tr>
        <tr>
            <td>408</td>
            <td>Request Timeout</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.9">Section 10.4.9</a> </td>
        </tr>
        <tr>
            <td>409</td>
            <td>Conflict</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.10">Section 10.4.10</a> </td>
        </tr>
        <tr>
            <td>410</td>
            <td>Gone</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.11">Section 10.4.11</a> </td>
        </tr>
        <tr>
            <td>411</td>
            <td>Length Required</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.12">Section 10.4.12</a> </td>
        </tr>
        <tr>
            <td>412</td>
            <td>Precondition Failed</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.13">Section 10.4.13</a> </td>
        </tr>
        <tr>
            <td>413</td>
            <td>Request Entity Too Large</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.14">Section 10.4.14</a> </td>
        </tr>
        <tr>
            <td>414</td>
            <td>Request-URI Too Long</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.15">Section 10.4.15</a> </td>
        </tr>
        <tr>
            <td>415</td>
            <td>Unsupported Media Type</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.16">Section 10.4.16</a> </td>
        </tr>
        <tr>
            <td>416</td>
            <td>Requested Range Not Satisfiable</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.17">Section 10.4.17</a> </td>
        </tr>
        <tr>
            <td>417</td>
            <td>Expectation Failed</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.4.18">Section 10.4.18</a> </td>
        </tr>
        <tr>
            <td>422</td>
            <td>Unprocessable Entity</td>
            <td> <a href="#RFC4918"><cite title="HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)">[RFC4918]</cite></a> , <a href="http://rfc.askapache.com/rfc4918#section-11.2">Section 11.2</a> </td>
        </tr>
        <tr>
            <td>423</td>
            <td>Locked</td>
            <td> <a href="#RFC4918"><cite title="HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)">[RFC4918]</cite></a> , <a href="http://rfc.askapache.com/rfc4918#section-11.3">Section 11.3</a> </td>
        </tr>
        <tr>
            <td>424</td>
            <td>Failed Dependency</td>
            <td> <a href="#RFC4918"><cite title="HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)">[RFC4918]</cite></a> , <a href="http://rfc.askapache.com/rfc4918#section-11.4">Section 11.4</a> </td>
        </tr>
        <tr>
            <td>426</td>
            <td>Upgrade Required</td>
            <td> <a href="#RFC2817"><cite title="Upgrading to TLS Within HTTP/1.1">[RFC2817]</cite></a> , <a href="http://rfc.askapache.com/rfc2817#section-6">Section 6</a> </td>
        </tr>
        <tr>
            <td>500</td>
            <td>Internal Server Error</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.5.1">Section 10.5.1</a> </td>
        </tr>
        <tr>
            <td>501</td>
            <td>Not Implemented</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.5.2">Section 10.5.2</a> </td>
        </tr>
        <tr>
            <td>502</td>
            <td>Bad Gateway</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.5.3">Section 10.5.3</a> </td>
        </tr>
        <tr>
            <td>503</td>
            <td>Service Unavailable</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.5.4">Section 10.5.4</a> </td>
        </tr>
        <tr>
            <td>504</td>
            <td>Gateway Timeout</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.5.5">Section 10.5.5</a> </td>
        </tr>
        <tr>
            <td>505</td>
            <td>HTTP Version Not Supported</td>
            <td> <a href="#RFC2616"><cite title="Hypertext Transfer Protocol -- HTTP/1.1">[RFC2616]</cite></a> , <a href="http://rfc.askapache.com/rfc2616#section-10.5.6">Section 10.5.6</a> </td>
        </tr>
        <tr>
            <td>506</td>
            <td>Variant Also Negotiates</td>
            <td> <a href="#RFC2295"><cite title="Transparent Content Negotiation in HTTP">[RFC2295]</cite></a> , <a href="http://rfc.askapache.com/rfc2295#section-8.1">Section 8.1</a> </td>
        </tr>
        <tr>
            <td>507</td>
            <td>Insufficient Storage</td>
            <td> <a href="#RFC4918"><cite title="HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)">[RFC4918]</cite></a> , <a href="http://rfc.askapache.com/rfc4918#section-11.5">Section 11.5</a> </td>
        </tr>
        <tr>
            <td>510</td>
            <td>Not Extended</td>
            <td> <a href="#RFC2774"><cite title="An HTTP Extension Framework">[RFC2774]</cite></a> , <a href="http://rfc.askapache.com/rfc2774#section-7">Section 7</a> </td>
        </tr>
    </tbody>
</table>


<h2>WordPress 2.8 Changes</h2>
<p>I just learned that <a href="https://core.trac.wordpress.org/ticket/9297">my modification</a> to the WordPress core was <a href="https://core.trac.wordpress.org/changeset/10740">accepted</a> and will be implemented for version 2.8!  This may mean WordPress is the only 100% HTTP/1.1 compliant software on the net!  Below is the new list (<em>I thought someone out there could use the php array</em>) and as you can see, unfortunately<strong>418 I'm a teapot</strong>didn't make it ;)</p>
<pre>$wp_header_to_desc = array(
  100 =&gt; &#039;Continue&#039;,
  101 =&gt; &#039;Switching Protocols&#039;,
  102 =&gt; &#039;Processing&#039;,
&nbsp;
  200 =&gt; &#039;OK&#039;,
  201 =&gt; &#039;Created&#039;,
  202 =&gt; &#039;Accepted&#039;,
  203 =&gt; &#039;Non-Authoritative Information&#039;,
  204 =&gt; &#039;No Content&#039;,
  205 =&gt; &#039;Reset Content&#039;,
  206 =&gt; &#039;Partial Content&#039;,
  207 =&gt; &#039;Multi-Status&#039;,
  226 =&gt; &#039;IM Used&#039;,
&nbsp;
  300 =&gt; &#039;Multiple Choices&#039;,
  301 =&gt; &#039;Moved Permanently&#039;,
  302 =&gt; &#039;Found&#039;,
  303 =&gt; &#039;See Other&#039;,
  304 =&gt; &#039;Not Modified&#039;,
  305 =&gt; &#039;Use Proxy&#039;,
  306 =&gt; &#039;Reserved&#039;,
  307 =&gt; &#039;Temporary Redirect&#039;,
&nbsp;
  400 =&gt; &#039;Bad Request&#039;,
  401 =&gt; &#039;Unauthorized&#039;,
  402 =&gt; &#039;Payment Required&#039;,
  403 =&gt; &#039;Forbidden&#039;,
  404 =&gt; &#039;Not Found&#039;,
  405 =&gt; &#039;Method Not Allowed&#039;,
  406 =&gt; &#039;Not Acceptable&#039;,
  407 =&gt; &#039;Proxy Authentication Required&#039;,
  408 =&gt; &#039;Request Timeout&#039;,
  409 =&gt; &#039;Conflict&#039;,
  410 =&gt; &#039;Gone&#039;,
  411 =&gt; &#039;Length Required&#039;,
  412 =&gt; &#039;Precondition Failed&#039;,
  413 =&gt; &#039;Request Entity Too Large&#039;,
  414 =&gt; &#039;Request-URI Too Long&#039;,
  415 =&gt; &#039;Unsupported Media Type&#039;,
  416 =&gt; &#039;Requested Range Not Satisfiable&#039;,
  417 =&gt; &#039;Expectation Failed&#039;,
  422 =&gt; &#039;Unprocessable Entity&#039;,
  423 =&gt; &#039;Locked&#039;,
  424 =&gt; &#039;Failed Dependency&#039;,
  426 =&gt; &#039;Upgrade Required&#039;,
&nbsp;
  500 =&gt; &#039;Internal Server Error&#039;,
  501 =&gt; &#039;Not Implemented&#039;,
  502 =&gt; &#039;Bad Gateway&#039;,
  503 =&gt; &#039;Service Unavailable&#039;,
  504 =&gt; &#039;Gateway Timeout&#039;,
  505 =&gt; &#039;HTTP Version Not Supported&#039;,
  506 =&gt; &#039;Variant Also Negotiates&#039;,
  507 =&gt; &#039;Insufficient Storage&#039;,
  510 =&gt; &#039;Not Extended&#039;
);</pre>


<h2>RIPE WHOIS</h2>
<blockquote cite="http://labs.ripe.net/content/ripe-database-api-documentation">
    <p>
    <p>All the status codes are standard HTTP codes ( <a href="http://www.iana.org/assignments/http-status-codes">http://www.iana.org/assignments/http-status-codes</a> ).</p>
    <p></p>
    <p>Clients should avoid any form of coupling with the the text/plain error message contained in response body since it may change between different releases of the API and is only intended as a starting point for indentifying the real causes of the exception event.</p>
    <p>The following table gives a brief description of the mapping between standard Whois V.3 responses and the related REST services status codes. Consider this table as just an example of the error mapping strategy, it may change with future releases.</p>
    </p>
</blockquote>
<table>
    <tbody>
        <tr>
            <th>System Exception</th>
            <th>Whois Error</th>
            <th>HTTP Status Code</th>
        </tr>
        <tr>
            <td>IllegalArgumentException</td>
            <td></td>
            <td>Bad Request (400)</td>
        </tr>
        <tr>
            <td>IllegalStateException</td>
            <td></td>
            <td>Internal Server Error (500)</td>
        </tr>
        <tr>
            <td>UnsupportedOperationException</td>
            <td></td>
            <td>Bad Request (400)</td>
        </tr>
        <tr>
            <td>ObjectNotFoundException</td>
            <td></td>
            <td>Not Found (404)</td>
        </tr>
        <tr>
            <td>IllegalStateException</td>
            <td></td>
            <td>Bad Request (400)</td>
        </tr>
        <tr>
            <td>IOException</td>
            <td></td>
            <td>Bad Request (400)</td>
        </tr>
        <tr>
            <td>SystemException</td>
            <td></td>
            <td>Internal Server Error (500)</td>
        </tr>
        <tr>
            <td>TooManyResultsException</td>
            <td></td>
            <td>Internal Server Error (500)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>No Entries Found (101)</td>
            <td>Not Found (404)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Unknown Source (102)</td>
            <td>Bad Request (400)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Unknown Object Type (103)</td>
            <td>Bad Request (400)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Unknown Attribute in Query (104)</td>
            <td>Bad Request (400)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Attribute Is Not Inverse Searchable (105)</td>
            <td>Bad Request (400)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>No Search Key Specified (106)</td>
            <td>Bad Request (400)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Access Denied (201)</td>
            <td>Forbidden (403)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Access Control Limit Reached (202)</td>
            <td>Forbidden (403)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Address Passing Not Allowed (203)</td>
            <td>Bad Request (400)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Maximum Referral Lines Exceeded (204)</td>
            <td>Internal Server Error (500)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Connection Has Been Closed(301)</td>
            <td>Internal Server Error (500)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Referral Timeout (302)</td>
            <td>Internal Server Error (500)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>No Referral Host (303)</td>
            <td>Internal Server Error (500)</td>
        </tr>
        <tr>
            <td>WhoisServerException</td>
            <td>Referral Host Not Responding (304)</td>
            <td>Internal Server Error (500)</td>
        </tr>
    </tbody>
</table>
<blockquote cite="http://labs.ripe.net/content/ripe-database-api-documentation">
    <p>
    <p>Clients will have to define error messages generic enough to represent the four main error conditions, that are Bad Request, Forbidden, Not Found and Internal Server Error.</p>
    <p>For example a possible mapping for client side error messages may be:</p>
    </p>
</blockquote>
<table>
    <tbody>
        <tr>
            <th>HTTP Status Code</th>
            <th>Error Message</th>
        </tr>
        <tr>
            <td>Bad Request (400)</td>
            <td>The service is unable to understand and process the query.</td>
        </tr>
        <tr>
            <td>Forbidden (403)</td>
            <td>Query limit exceeded.</td>
        </tr>
        <tr>
            <td>Not Found (404)</td>
            <td>No results were found for Your search "<tt>Search term</tt>"</td>
        </tr>
        <tr>
            <td>Internal Server Error (500)</td>
            <td>The server encountered an unexpected condition which prevented it from fulfilling the request.</td>
        </tr>
    </tbody>
</table>


<h2>Helpful HTTP Links</h2>
<ol>
    <li> <a href="http://www.iana.org/assignments/http-status-codes">IANA registry</a> </li>
    <li> <a href="http://rfc.askapache.com/rfc2324">Hyper Text Coffee Pot Control Protocol (HTCPCP/1.0)</a> </li>
    <li> <a href="http://livedocs.adobe.com/fms/2/docs/00000338.html">Adobe Flash status code definitions (ie 408)</a> </li>
    <li> <a href="http://support.microsoft.com/?id=318380">Microsoft Internet Information Server Status Codes and Sub-Codes</a> </li>
    <li> <a href="http://zamez.org/httplint?url=http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html">httplint</a> </li>
    <li> <a href="http://www.w3.org/Protocols/HTTP/HTRQ_Headers.html">HTTP Headers, brief intro.</a> </li>
    <li> <a href="http://www.w3.org/TR/cuap">Common User-Agent Issues</a> </li>
    <li>[RFC2295] <a href="mailto:koen@win.tue.nl" title="Technische Universiteit Eindhoven">Holtman, K.</a> and <a href="mailto:mutz@hpl.hp.com" title="Hewlett-Packard Company">A.H. Mutz</a> , " <a href="http://rfc.askapache.com/rfc2295">Transparent Content Negotiation in HTTP</a> ", RFC 2295, March 1998.</li>
    <li>[RFC2518] <a href="mailto:yarong@microsoft.com" title="Microsoft Corporation">Goland, Y.</a> , <a href="mailto:ejw@ics.uci.edu" title="Dept. Of Information and Computer Science, University of California, Irvine">Whitehead, E.</a> , <a href="mailto:asad@netscape.com" title="Netscape">Faizi, A.</a> , <a href="mailto:srcarter@novell.com" title="Novell">Carter, S.R.</a> , and <a href="mailto:dcjensen@novell.com" title="Novell">D. Jensen</a> , " <a href="http://rfc.askapache.com/rfc2518">HTTP Extensions for Distributed Authoring -- WEBDAV</a> ", RFC 2518, February 1999.</li>
    <li>[RFC2616] <a href="mailto:fielding@ics.uci.edu" title="University of California, Irvine">Fielding, R.</a> , <a href="mailto:jg@w3.org" title="W3C">Gettys, J.</a> , <a href="mailto:mogul@wrl.dec.com" title="Compaq Computer Corporation">Mogul, J.</a> , <a href="mailto:frystyk@w3.org" title="MIT Laboratory for Computer Science">Frystyk, H.</a> , <a href="mailto:masinter@parc.xerox.com" title="Xerox Corporation">Masinter, L.</a> , <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a> , and <a href="mailto:timbl@w3.org" title="W3C">T. Berners-Lee</a> , " <a href="http://rfc.askapache.com/rfc2616">Hypertext Transfer Protocol -- HTTP/1.1</a> ", RFC 2616, June 1999.</li>
    <li>[RFC2774] <a href="mailto:frystyk@microsoft.com" title="Microsoft Corporation">Nielsen, H.</a> , <a href="mailto:paulle@microsoft.com" title="Microsoft Corporation">Leach, P.</a> , and <a href="mailto:lawrence@agranat.com" title="Agranat Systems, Inc.">S. Lawrence</a> , " <a href="http://rfc.askapache.com/rfc2774">An HTTP Extension Framework</a> ", RFC 2774, February 2000.</li>
    <li>[RFC2817] Khare, R. and S. Lawrence, " <a href="http://rfc.askapache.com/rfc2817">Upgrading to TLS Within HTTP/1.1</a> ", RFC 2817, May 2000.</li>
    <li>[RFC3229] Mogul, J., Krishnamurthy, B., Douglis, F., Feldmann, A., Goland, Y., van Hoff, A., and D. Hellerstein, " <a href="http://rfc.askapache.com/rfc3229">Delta encoding in HTTP</a> ", RFC 3229, January 2002.</li>
    <li>[RFC4918] <a href="mailto:ldusseault@commerce.net" title="CommerceNet">Dusseault, L., Ed.</a> , " <a href="http://rfc.askapache.com/rfc4918">HTTP Extensions for Web Distributed Authoring and Versioning (WebDAV)</a> ", RFC 4918, June 2007.</li>
</ol><p><a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html"></a><a href="http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html">HTTP Status Codes and Htaccess ErrorDocuments</a> originally appeared on <cite>AskApache.com</cite> </p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html/feed</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>Actual Htaccess Files from My Server</title>
		<link>http://www.askapache.com/htaccess/real-world-htaccess-files.html</link>
		<comments>http://www.askapache.com/htaccess/real-world-htaccess-files.html#comments</comments>
		<pubDate>Sat, 17 Apr 2010 15:06:22 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Htaccess]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=4357</guid>
		<description><![CDATA[<pre>#### No https except to wp-admin -
# If the request is empty ( implies fopen or normal file access by a php script )
RewriteCond %{THE_REQUEST} ^$ [OR]

# OR if the request if for wp-admin or wp-login.php
RewriteCond %{REQUEST_URI} ^/(wp-admin&#124;wp-login\.php).*$ [NC,OR]

# OR if the Referer is https
RewriteCond %{HTTP_REFERER} ^https://www.askapache.com/.*$ [NC]

# THEN skip the following rule, basically all this does is force https or badhost to be redirected
# BUT because of the above 3 rewritecond's, this won't break poorly written admin scripts
RewriteRule .* - [S=1]

RewriteCond %{HTTPS} =on [OR]
RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
RewriteRule .* http://www.askapache.com%{REQUEST_URI} [R=301,L]

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(wp-admin/.*&#124;wp-login\.php.*)\ HTTP/ [NC]
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]</pre>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.askapache.com/htaccess/real-world-htaccess-files.html"></a><a href="http://www.askapache.com/htaccess/real-world-htaccess-files.html"><cite>AskApache.com</cite></a></p><p>I was going through some backups from years ago, and ran:</p>
<pre>locate .htaccess | xargs -I&#039;{}&#039; cat &#039;{}&#039; &gt;&gt; master-htaccesser.txt</pre>
<p>My site is named after reading source code because that is what helps me the most when I'm trying to learn something unusually difficult.   Just like functions and aliases, it is very helpful to have cheatsheets for common commands.. not much is better than real-world examples.  Unfortunately because this was compiled from hundreds of htaccess files on multiple hosts and platforms, and due to the concatenation, it's not organized.</p>

<p>Normally I would not publish something like this, who knows how much unreleased tricks I forgot about..  but in order to say thanks to all those working for open-source, the FSF, and to all those who don't steal content, and to all the incredible authors who shared with me (I twitter most of what I find, and follow my favs), here ya go..</p>


<p class="cnote"><strong>ATTN:</strong> Please let me know if this is total junk or not, this is around 1/500th of my master-htaccesser.txt file.. and I'd be happy to post more if it helps..</p>

<h2>Checking for Cookie</h2>
<p>Used this to stop mp3-scrapers.. checks for a cookie ending in MP3P=02357</p>
<pre>Options -Indexes
RewriteEngine On
RewriteCond %{HTTP_COOKIE} !^.*MP3P=([0-9]+).* [NC]
RewriteRule .* - [F,L]</pre>

<h2>Setting Environment Var if Proxied</h2>
<pre>RewriteEngine On
RewriteRule "\.(gif|png|jpg)$" "-" [ENV=proxied_image:1]
RewriteCond "%{ENV:proxied_image}" "!1"
RewriteRule "^" "-" [ENV=proxied_other:1]</pre>

<h2>nokeepalive for ErrorDocs and Abusers</h2>
<pre>Options SymLinksIfOwnerMatch IncludesNOEXEC
AddOutputFilter Includes html
SetEnv nokeepalive
Order Allow,Deny
Allow from all
# 1 YEAR
&lt;filesMatch "\.(js|css)$"&gt;
Header unset Pragma
FileETag None
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
Header unset Last-Modified
Header unset Last-Modified
Header unset ETag
&nbsp;
SetOutputFilter DEFLATE
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
&lt;/filesMatch&gt;
SecFilterEngine Off
&nbsp;
# 1 YEAR
&lt;filesMatch "\.(js|css)$"&gt;
Header unset Pragma
FileETag None
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
Header unset Last-Modified
Header unset Last-Modified
Header unset ETag
&nbsp;
SetOutputFilter DEFLATE
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
&lt;/filesMatch&gt;</pre>








<h2>Unreleased Tests for AskApache Password Protection</h2>
<pre># +ASKAPACHE PASSPRO 4.6.6
#######################################################
#               __                          __
#   ____ ______/ /______ _____  ____ ______/ /_  ___
#  / __ `/ ___/ //_/ __ `/ __ \/ __ `/ ___/ __ \/ _ \
# / /_/ (__  ) ,&lt; / /_/ / /_/ / /_/ / /__/ / / /  __/
# \__,_/____/_/|_|\__,_/ .___/\__,_/\___/_/ /_/\___/
#                     /_/
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
# +APRO SIDS
# +SID 21030002
Order Deny,Allow
Deny from All
Satisfy Any
AuthType Digest
AuthName "Protected By AskApache"
AuthDigestDomain / http://www.askapache.com/
AuthDigestFile /home/.greer/askapache/sites/askapache.com/.htpasswda3
Require valid-user
&lt;filesMatch "\.(ico|pdf|flv|jpg|jpeg|mp3|mpg|mp4|mov|wav|wmv|png|gif|swf|css|js)$"&gt;
Allow from All
&lt;/filesMatch&gt;
&lt;filesMatch "(async-upload|admin-ajax)\.php$"&gt;
&lt;ifModule mod_security.c&gt;
SecFilterEngine Off
&lt;/ifModule&gt;
Allow from All
&lt;/filesMatch&gt;
# -SID 21030002
# -APRO SIDS
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
#               __                          __
#   ____ ______/ /______ _____  ____ ______/ /_  ___
#  / __ `/ ___/ //_/ __ `/ __ \/ __ `/ ___/ __ \/ _ \
# / /_/ (__  ) ,&lt; / /_/ / /_/ / /_/ / /__/ / / /  __/
# \__,_/____/_/|_|\__,_/ .___/\__,_/\___/_/ /_/\___/
#                     /_/
#######################################################
# -ASKAPACHE PASSPRO 4.6.6
&nbsp;
# +ASKAPACHE PASSPRO 4.6.6
#######################################################
#               __                          __
#   ____ ______/ /______ _____  ____ ______/ /_  ___
#  / __ `/ ___/ //_/ __ `/ __ \/ __ `/ ___/ __ \/ _ \
# / /_/ (__  ) ,&lt; / /_/ / /_/ / /_/ / /__/ / / /  __/
# \__,_/____/_/|_|\__,_/ .___/\__,_/\___/_/ /_/\___/
#                     /_/
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
# +APRO SIDS
# +SID Test
ErrorDocument 401 /wp-content/askapache/test.gif
ErrorDocument 403 /wp-content/askapache/test.gif
ErrorDocument 404 /wp-content/askapache/test.gif
ErrorDocument 500 /wp-content/askapache/test.gif
ServerSignature On
&lt;ifModule mod_alias.c&gt;
RedirectMatch 305 ^.*modaliastest$ http://www.askapache.com
&lt;/ifModule&gt;
&lt;ifModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} modrewritetest [NC]
RewriteRule .* http://www.askapache.com [R=307,L]
&lt;/ifModule&gt;
&lt;files modsec_check.gif&gt;
&lt;ifModule mod_security.c&gt;
SetEnv MODSEC_ENABLE On
SecFilterEngine On
SecFilterDefaultAction "nolog,noauditlog,pass"
SecAuditEngine Off
SecFilterInheritance Off
SecFilter modsecuritytest "deny,nolog,noauditlog,status:503"
Deny from All
&lt;/ifModule&gt;
&lt;/files&gt;
&lt;files basic_auth_test.gif&gt;
AuthType Basic
AuthName "askapache test"
AuthUserFile /home/.greer/askapache/sites/askapache.com/htdocs/wp-content/askapache/.htpasswd-basic
Require valid-user
&lt;/files&gt;
&lt;files digest_check.gif&gt;
AuthType Digest
AuthName "askapache test"
AuthDigestDomain /wp-content/askapache/ http://www.askapache.com/wp-content/askapache/
AuthUserFile /home/.greer/askapache/sites/askapache.com/htdocs/wp-content/askapache/.htpasswd-digest
Require none
&lt;/files&gt;
&lt;files authuserfile_test.gif&gt;
AuthType Digest
AuthName "askapache test"
AuthDigestDomain /wp-content/askapache/ http://www.askapache.com/wp-content/askapache/
AuthUserFile /home/.greer/askapache/sites/askapache.com/htdocs/wp-content/askapache/.htpasswd-digest
Require valid-user
&lt;/files&gt;
&lt;files authdigestfile_test.gif&gt;
AuthType Digest
AuthName "askapache test"
AuthDigestDomain /wp-content/askapache/ http://www.askapache.com/wp-content/askapache/
AuthDigestFile /home/.greer/askapache/sites/askapache.com/htdocs/wp-content/askapache/.htpasswd-digest
Require valid-user
&lt;/files&gt;
# -SID Test
# -APRO SIDS
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
#               __                          __
#   ____ ______/ /______ _____  ____ ______/ /_  ___
#  / __ `/ ___/ //_/ __ `/ __ \/ __ `/ ___/ __ \/ _ \
# / /_/ (__  ) ,&lt; / /_/ / /_/ / /_/ / /__/ / / /  __/
# \__,_/____/_/|_|\__,_/ .___/\__,_/\___/_/ /_/\___/
#                     /_/
#######################################################
# -ASKAPACHE PASSPRO 4.6.6</pre>
















<h2>Warming up to the really advanced tests</h2>
<pre>Options +ExecCGI
Order Deny,Allow
Deny from All
Allow from 208.113.134.190 64.111.114.111 208.113.134.203 208.113.152.201 env=REDIRECT_STATUS
Satisfy Any
Options +FollowSymLinks
AddHandler application/x-httpd-php .php
&nbsp;
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} !^tyy+$ [NC]
RewriteCond %{REMOTE_USER} ^(.+)$
RewriteRule ^(.*)$ $1/-%1 [R=302,L]
Options +ExecCGI +FollowSymLinks
DirectoryIndex index.php
ErrorDocument 404 /cgi-bin/pro/index.php
&nbsp;
AuthType Digest
AuthName "AskApache Pro"
AuthDigestFile /home/askapache/sites/askapache.com/.htpasswd-pro
AuthDigestDomain /cgi-bin/pro/ http://www.askapache.com/cgi-bin/pro/ https://www.askapache.com/cgi-bin/pro/
Require user askapacheDirectoryIndex p.php
ErrorDocument 403 /cgi-bin/p/p.php
ErrorDocument 401 /cgi-bin/p/p.php
ErrorDocument 500 /cgi-bin/p/p.php
ErrorDocument 503 /cgi-bin/p/p.php
&nbsp;
RewriteEngine On
RewriteBase /
RewriteRule .* - [E=INFO_API_VERSION:%{API_VERSION}]
RewriteRule .* - [E=INFO_AUTH_TYPE:%{AUTH_TYPE}]
RewriteRule .* - [E=INFO_CONTENT_LENGTH:%{CONTENT_LENGTH}]
RewriteRule .* - [E=INFO_CONTENT_TYPE:%{CONTENT_TYPE}]
RewriteRule .* - [E=INFO_DOCUMENT_ROOT:%{DOCUMENT_ROOT}]
RewriteRule .* - [E=INFO_GATEWAY_INTERFACE:%{GATEWAY_INTERFACE}]
RewriteRule .* - [E=INFO_HTTPS:%{HTTPS}]
RewriteRule .* - [E=INFO_HTTP_ACCEPT:%{HTTP:Accept}]
RewriteRule .* - [E=INFO_HTTP_ACCEPT_LANGUAGE:%{HTTP:Accept-Language}]
RewriteRule .* - [E=INFO_HTTP_ACCEPT_ENCODING:%{HTTP:Accept-Encoding}]
RewriteRule .* - [E=INFO_HTTP_ACCEPT_CHARSET:%{HTTP:Accept-Charset}]
RewriteRule .* - [E=INFO_HTTP_CACHE_CONTROL:%{HTTP:Cache-Control}]
RewriteRule .* - [E=INFO_HTTP_CONNECTION:%{HTTP:Connection}]
RewriteRule .* - [E=INFO_HTTP_COOKIE:%{HTTP_COOKIE}]
RewriteRule .* - [E=INFO_HTTP_FORWARDED:%{HTTP_FORWARDED}]
RewriteRule .* - [E=INFO_HTTP_HOST:%{HTTP_HOST}]
RewriteRule .* - [E=INFO_HTTP_KEEP_ALIVE:%{HTTP_KEEP_ALIVE}]
RewriteRule .* - [E=INFO_HTTP_PROXY_CONNECTION:%{HTTP_PROXY_CONNECTION}]
RewriteRule .* - [E=INFO_HTTP_REFERER:%{HTTP:Referer}]
RewriteRule .* - [E=INFO_HTTP_USER_AGENT:%{HTTP_USER_AGENT}]
RewriteRule .* - [E=INFO_IS_SUBREQ:%{IS_SUBREQ}]
RewriteRule .* - [E=INFO_ORIG_PATH_INFO:%{ORIG_PATH_INFO}]
RewriteRule .* - [E=INFO_ORIG_PATH_TRANSLATED:%{ORIG_PATH_TRANSLATED}]
RewriteRule .* - [E=INFO_ORIG_SCRIPT_FILENAME:%{ORIG_SCRIPT_FILENAME}]
RewriteRule .* - [E=INFO_ORIG_SCRIPT_NAME:%{ORIG_SCRIPT_NAME}]
RewriteRule .* - [E=INFO_PATH:%{PATH}]
RewriteRule .* - [E=INFO_PATH_INFO:%{PATH_INFO}]
RewriteRule .* - [E=INFO_QUERY_STRING:%{QUERY_STRING}]
RewriteRule .* - [E=INFO_REDIRECT_QUERY_STRING:%{REDIRECT_QUERY_STRING}]
RewriteRule .* - [E=INFO_REDIRECT_REMOTE_USER:%{REDIRECT_REMOTE_USER}]
RewriteRule .* - [E=INFO_REDIRECT_STATUS:%{REDIRECT_STATUS}]
RewriteRule .* - [E=INFO_REDIRECT_URL:%{REDIRECT_URL}]
RewriteRule .* - [E=INFO_REMOTE_ADDR:%{REMOTE_ADDR}]
RewriteRule .* - [E=INFO_REMOTE_HOST:%{REMOTE_HOST}]
RewriteRule .* - [E=INFO_REMOTE_IDENT:%{REMOTE_IDENT}]
RewriteRule .* - [E=INFO_REMOTE_PORT:%{REMOTE_PORT}]
RewriteRule .* - [E=INFO_REMOTE_USER:%{REMOTE_USER}]
RewriteRule .* - [E=INFO_REQUEST_FILENAME:%{REQUEST_FILENAME}]
RewriteRule .* - [E=INFO_REQUEST_METHOD:%{REQUEST_METHOD}]
RewriteRule .* - [E=INFO_REQUEST_URI:%{REQUEST_URI}]
RewriteRule .* - [E=INFO_REDIRECT_REQUEST_URI:%{REDIRECT_REQUEST_URI}]
RewriteRule .* - [E=INFO_SCRIPT_FILENAME:%{SCRIPT_FILENAME}]
RewriteRule .* - [E=INFO_SCRIPT_GROUP:%{SCRIPT_GROUP}]
RewriteRule .* - [E=INFO_SCRIPT_NAME:%{SCRIPT_NAME}]
RewriteRule .* - [E=INFO_SCRIPT_URI:%{SCRIPT_URI}]
RewriteRule .* - [E=INFO_SCRIPT_URL:%{SCRIPT_URL}]
RewriteRule .* - [E=INFO_SCRIPT_USER:%{SCRIPT_USER}]
RewriteRule .* - [E=INFO_SERVER_ADDR:%{SERVER_ADDR}]
RewriteRule .* - [E=INFO_SERVER_ADMIN:%{SERVER_ADMIN}]
RewriteRule .* - [E=INFO_SERVER_NAME:%{SERVER_NAME}]
RewriteRule .* - [E=INFO_SERVER_PORT:%{SERVER_PORT}]
RewriteRule .* - [E=INFO_SERVER_PROTOCOL:%{SERVER_PROTOCOL}]
RewriteRule .* - [E=INFO_SERVER_SIGNATURE:%{SERVER_SIGNATURE}]
RewriteRule .* - [E=INFO_SERVER_SOFTWARE:%{SERVER_SOFTWARE}]
RewriteRule .* - [E=INFO_THE_REQUEST:%{THE_REQUEST}]
RewriteRule .* - [E=INFO_TIME:%{TIME}]
RewriteRule .* - [E=INFO_TIME_DAY:%{TIME_DAY}]
RewriteRule .* - [E=INFO_TIME_HOUR:%{TIME_HOUR}]
RewriteRule .* - [E=INFO_TIME_MIN:%{TIME_MIN}]
RewriteRule .* - [E=INFO_TIME_MON:%{TIME_MON}]
RewriteRule .* - [E=INFO_TIME_SEC:%{TIME_SEC}]
RewriteRule .* - [E=INFO_TIME_WDAY:%{TIME_WDAY}]
RewriteRule .* - [E=INFO_TIME_YEAR:%{TIME_YEAR}]
RewriteRule .* - [E=INFO_TZ:%{TZ}]
RewriteRule .* - [E=INFO_UNIQUE_ID:%{UNIQUE_ID}]
&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_LANGUAGE "%{INFO_HTTP_ACCEPT_LANGUAGE}e"
RequestHeader set INFO_HTTP_ACCEPT_ENCODING "%{INFO_HTTP_ACCEPT_ENCODING}e"
RequestHeader set INFO_HTTP_ACCEPT_CHARSET "%{INFO_HTTP_ACCEPT_CHARSET}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_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_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_URI "%{INFO_REQUEST_URI}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"
&nbsp;
Options +FollowSymLinks +ExecCGI
DirectoryIndex /cgi-bin/rewrite-test/index.php
&nbsp;
Header echo ^.*
&nbsp;
AuthType Digest
AuthName "AskApache Pro"
AuthDigestFile /home/askapache/sites/askapache.com/.htpasswd-pro
AuthDigestDomain / http://www.askapache.com/cgi-bin/rewrite-test/ https://www.askapache.com/cgi-bin/rewrite-test/
Require user askapache
&nbsp;
SetEnv MODSEC_ENABLE=On
&nbsp;
SetEnvIfNoCase ^WWW-Auth "(.+)" HTTP_WWW_AUTHORIZATION=$1
SetEnvIfNoCase ^If "(.+)" HTTP_IF_MODIFIED_SINCE=$1
SetEnvIfNoCase ^If-None-Match$ "(.+)" HTTP_IF_NONE_MATCH=$1
SetEnvIfNoCase ^Cache-Control$ "(.+)" HTTP_CACHE_CONTROL=$1
SetEnvIfNoCase ^Connection$ "(.+)" HTTP_CONNECTION=$1
SetEnvIfNoCase ^Keep-Alive$ "(.+)" HTTP_KEEP_ALIVE=$1
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
SetEnvIfNoCase ^Authorization$ ".+username=\"(.+)\".+" HTTP_REMOTE_USER=$1
SetEnvIfNoCase ^Content-Type$ "(.+)" HTTP_CONTENT_TYPE=$1
SetEnvIfNoCase ^Content-Length$ "(.+)" HTTP_CONTENT_LENGTH=$1
SetEnvIfNoCase Server_Addr "(.+)" SERVER_ADDR=$1
SetEnvIfNoCase Request_Method "(.+)" REQUEST_METHOD=$1
SetEnvIfNoCase Request_Protocol "(.+)" REQUEST_PROTOCOL=$1
SetEnvIfNoCase Request_URI "(.+)" REQUEST_URI=$1
&nbsp;
ErrorDocument 100 /cgi-bin/rewrite-test/index.php?g=100
ErrorDocument 101 /cgi-bin/rewrite-test/index.php?g=101
ErrorDocument 102 /cgi-bin/rewrite-test/index.php?g=102
ErrorDocument 200 /cgi-bin/rewrite-test/index.php?g=200
ErrorDocument 201 /cgi-bin/rewrite-test/index.php?g=201
ErrorDocument 202 /cgi-bin/rewrite-test/index.php?g=202
ErrorDocument 203 /cgi-bin/rewrite-test/index.php?g=203
ErrorDocument 204 /cgi-bin/rewrite-test/index.php?g=204
ErrorDocument 205 /cgi-bin/rewrite-test/index.php?g=205
ErrorDocument 206 /cgi-bin/rewrite-test/index.php?g=206
ErrorDocument 207 /cgi-bin/rewrite-test/index.php?g=207
ErrorDocument 300 /cgi-bin/rewrite-test/index.php?g=300
ErrorDocument 301 /cgi-bin/rewrite-test/index.php?g=301
ErrorDocument 302 /cgi-bin/rewrite-test/index.php?g=302
ErrorDocument 303 /cgi-bin/rewrite-test/index.php?g=303
ErrorDocument 304 /cgi-bin/rewrite-test/index.php?g=304
ErrorDocument 305 /cgi-bin/rewrite-test/index.php?g=305
ErrorDocument 306 /cgi-bin/rewrite-test/index.php?g=306
ErrorDocument 307 /cgi-bin/rewrite-test/index.php?g=307
ErrorDocument 400 /cgi-bin/rewrite-test/index.php?g=400
ErrorDocument 401 /cgi-bin/rewrite-test/index.php?g=401
ErrorDocument 402 /cgi-bin/rewrite-test/index.php?g=402
ErrorDocument 403 /cgi-bin/rewrite-test/index.php?g=403
ErrorDocument 404 /cgi-bin/rewrite-test/index.php?g=404
ErrorDocument 405 /cgi-bin/rewrite-test/index.php?g=405
ErrorDocument 406 /cgi-bin/rewrite-test/index.php?g=406
ErrorDocument 407 /cgi-bin/rewrite-test/index.php?g=407
ErrorDocument 408 /cgi-bin/rewrite-test/index.php?g=408
ErrorDocument 409 /cgi-bin/rewrite-test/index.php?g=409
ErrorDocument 410 /cgi-bin/rewrite-test/index.php?g=410
ErrorDocument 411 /cgi-bin/rewrite-test/index.php?g=411
ErrorDocument 412 /cgi-bin/rewrite-test/index.php?g=412
ErrorDocument 413 /cgi-bin/rewrite-test/index.php?g=413
ErrorDocument 414 /cgi-bin/rewrite-test/index.php?g=414
ErrorDocument 415 /cgi-bin/rewrite-test/index.php?g=415
ErrorDocument 416 /cgi-bin/rewrite-test/index.php?g=416
ErrorDocument 417 /cgi-bin/rewrite-test/index.php?g=417
ErrorDocument 418 /cgi-bin/rewrite-test/index.php?g=418
ErrorDocument 419 /cgi-bin/rewrite-test/index.php?g=419
ErrorDocument 420 /cgi-bin/rewrite-test/index.php?g=420
ErrorDocument 421 /cgi-bin/rewrite-test/index.php?g=421
ErrorDocument 422 /cgi-bin/rewrite-test/index.php?g=422
ErrorDocument 423 /cgi-bin/rewrite-test/index.php?g=423
ErrorDocument 424 /cgi-bin/rewrite-test/index.php?g=424
ErrorDocument 425 /cgi-bin/rewrite-test/index.php?g=425
ErrorDocument 426 /cgi-bin/rewrite-test/index.php?g=426
ErrorDocument 500 /cgi-bin/rewrite-test/index.php?g=500
ErrorDocument 501 /cgi-bin/rewrite-test/index.php?g=501
ErrorDocument 502 /cgi-bin/rewrite-test/index.php?g=502
ErrorDocument 503 /cgi-bin/rewrite-test/index.php?g=503
ErrorDocument 504 /cgi-bin/rewrite-test/index.php?g=504
ErrorDocument 505 /cgi-bin/rewrite-test/index.php?g=505
ErrorDocument 506 /cgi-bin/rewrite-test/index.php?g=506
ErrorDocument 507 /cgi-bin/rewrite-test/index.php?g=507
ErrorDocument 508 /cgi-bin/rewrite-test/index.php?g=508
ErrorDocument 509 /cgi-bin/rewrite-test/index.php?g=509
ErrorDocument 510 /cgi-bin/rewrite-test/index.php?g=510
&nbsp;
RewriteEngine On
RewriteBase /
&nbsp;
RewriteRule .* - [E=IN_AUTH_TYPE:%{AUTH_TYPE}]
RewriteRule .* - [E=IN_CONTENT_LENGTH:%{CONTENT_LENGTH}]
RewriteRule .* - [E=IN_CONTENT_TYPE:%{CONTENT_TYPE}]
RewriteRule .* - [E=IN_DATE_GMT:%{DATE_GMT}]
RewriteRule .* - [E=IN_DATE_LOCAL:%{DATE_LOCAL}]
RewriteRule .* - [E=IN_DOCUMENT_NAME:%{DOCUMENT_NAME}]
RewriteRule .* - [E=IN_DOCUMENT_PATH_INFO:%{DOCUMENT_PATH_INFO}]
RewriteRule .* - [E=IN_DOCUMENT_ROOT:%{DOCUMENT_ROOT}]
RewriteRule .* - [E=IN_DOCUMENT_URI:%{DOCUMENT_URI}]
RewriteRule .* - [E=IN_GATEWAY_INTERFACE:%{GATEWAY_INTERFACE}]
RewriteRule .* - [E=IN_LAST_MODIFIED:%{LAST_MODIFIED}]
RewriteRule .* - [E=IN_PATH_INFO:%{PATH_INFO}]
RewriteRule .* - [E=IN_PATH_TRANSLATED:%{PATH_TRANSLATED}]
RewriteRule .* - [E=IN_QUERY_STRING:%{QUERY_STRING}]
RewriteRule .* - [E=IN_QUERY_STRING_UNESCAPED:%{QUERY_STRING_UNESCAPED}]
RewriteRule .* - [E=IN_REMOTE_ADDR:%{REMOTE_ADDR}]
RewriteRule .* - [E=IN_REMOTE_HOST:%{REMOTE_HOST}]
RewriteRule .* - [E=IN_REMOTE_IDENT:%{REMOTE_IDENT}]
RewriteRule .* - [E=IN_REMOTE_PORT:%{REMOTE_PORT}]
RewriteRule .* - [E=IN_REMOTE_USER:%{REMOTE_USER}]
RewriteRule .* - [E=IN_REDIRECT_HANDLER:%{REDIRECT_HANDLER}]
RewriteRule .* - [E=IN_REDIRECT_QUERY_STRING:%{REDIRECT_QUERY_STRING}]
RewriteRule .* - [E=IN_REDIRECT_REMOTE_USER:%{REDIRECT_REMOTE_USER}]
RewriteRule .* - [E=IN_REDIRECT_STATUS:%{REDIRECT_STATUS}]
RewriteRule .* - [E=IN_REDIRECT_URL:%{REDIRECT_URL}]
RewriteRule .* - [E=IN_REQUEST_METHOD:%{REQUEST_METHOD}]
RewriteRule .* - [E=IN_REQUEST_URI:%{REQUEST_URI}]
RewriteRule .* - [E=IN_SCRIPT_FILENAME:%{SCRIPT_FILENAME}]
RewriteRule .* - [E=IN_SCRIPT_NAME:%{SCRIPT_NAME}]
RewriteRule .* - [E=IN_SERVER_ADMIN:%{SERVER_ADMIN}]
RewriteRule .* - [E=IN_SERVER_NAME:%{SERVER_NAME}]
RewriteRule .* - [E=IN_SERVER_ADDR:%{SERVER_ADDR}]
RewriteRule .* - [E=IN_SERVER_PORT:%{SERVER_PORT}]
RewriteRule .* - [E=IN_SERVER_PROTOCOL:%{SERVER_PROTOCOL}]
RewriteRule .* - [E=IN_SERVER_SIGNATURE:%{SERVER_SIGNATURE}]
RewriteRule .* - [E=IN_SERVER_SOFTWARE:%{SERVER_SOFTWARE}]
RewriteRule .* - [E=IN_USER_NAME:%{USER_NAME}]
RewriteRule .* - [E=IN_TZ:%{TZ}]
RewriteRule .* - [E=IN_API_VERSION:%{API_VERSION}]
RewriteRule .* - [E=IN_HTTPS:%{HTTPS}]
RewriteRule .* - [E=IN_HTTP_ACCEPT:%{HTTP_ACCEPT}]
RewriteRule .* - [E=IN_HTTP_ACCEPT_CHARSET:%{HTTP_ACCEPT_CHARSET}]
RewriteRule .* - [E=IN_HTTP_ACCEPT_ENCODING:%{HTTP_ACCEPT_ENCODING}]
RewriteRule .* - [E=IN_HTTP_ACCEPT_LANGUAGE:%{HTTP_ACCEPT_LANGUAGE}]
RewriteRule .* - [E=IN_HTTP_CACHE_CONTROL:%{HTTP_CACHE_CONTROL}]
RewriteRule .* - [E=IN_HTTP_CONNECTION:%{HTTP_CONNECTION}]
RewriteRule .* - [E=IN_HTTP_COOKIE:%{HTTP_COOKIE}]
RewriteRule .* - [E=IN_HTTP_FORWARDED:%{HTTP_FORWARDED}]
RewriteRule .* - [E=IN_HTTP_HOST:%{HTTP_HOST}]
RewriteRule .* - [E=IN_HTTP_KEEP_ALIVE:%{HTTP_KEEP_ALIVE}]
RewriteRule .* - [E=IN_HTTP_PROXY_CONNECTION:%{HTTP_PROXY_CONNECTION}]
RewriteRule .* - [E=IN_HTTP_REFERER:%{HTTP_REFERER}]
RewriteRule .* - [E=IN_HTTP_USER_AGENT:%{HTTP_USER_AGENT}]
RewriteRule .* - [E=IN_IS_SUBREQ:%{IS_SUBREQ}]
RewriteRule .* - [E=IN_ORIG_PATH_INFO:%{ORIG_PATH_INFO}]
RewriteRule .* - [E=IN_ORIG_PATH_TRANSLATED:%{ORIG_PATH_TRANSLATED}]
RewriteRule .* - [E=IN_ORIG_SCRIPT_FILENAME:%{ORIG_SCRIPT_FILENAME}]
RewriteRule .* - [E=IN_ORIG_SCRIPT_NAME:%{ORIG_SCRIPT_NAME}]
RewriteRule .* - [E=IN_PATH:%{PATH}]
RewriteRule .* - [E=IN_PHP_SELF:%{PHP_SELF}]
RewriteRule .* - [E=IN_REQUEST_FILENAME:%{REQUEST_FILENAME}]
RewriteRule .* - [E=IN_REQUEST_TIME:%{REQUEST_TIME}]
RewriteRule .* - [E=IN_SCRIPT_GROUP:%{SCRIPT_GROUP}]
RewriteRule .* - [E=IN_SCRIPT_USER:%{SCRIPT_USER}]
RewriteRule .* - [E=IN_THE_REQUEST:%{THE_REQUEST}]
RewriteRule .* - [E=IN_TIME:%{TIME}]
RewriteRule .* - [E=IN_TIME_DAY:%{TIME_DAY}]
RewriteRule .* - [E=IN_TIME_HOUR:%{TIME_HOUR}]
RewriteRule .* - [E=IN_TIME_MIN:%{TIME_MIN}]
RewriteRule .* - [E=IN_TIME_MON:%{TIME_MON}]
RewriteRule .* - [E=IN_TIME_SEC:%{TIME_SEC}]
RewriteRule .* - [E=IN_TIME_WDAY:%{TIME_WDAY}]
RewriteRule .* - [E=IN_TIME_YEAR:%{TIME_YEAR}]
RewriteRule .* - [E=IN_PATH:%{PATH}]
RewriteRule .* - [E=IN_SCRIPT_URI:%{SCRIPT_URI}]
RewriteRule .* - [E=IN_SCRIPT_URL:%{SCRIPT_URL}]
RewriteRule .* - [E=IN_UNIQUE_ID:%{UNIQUE_ID}]
&nbsp;
RewriteRule .* - [E=ENV_PATH:%{ENV:PATH}]
RewriteRule .* - [E=ENV_SCRIPT_URI:%{ENV:SCRIPT_URI}]
RewriteRule .* - [E=ENV_SCRIPT_URL:%{ENV:SCRIPT_URL}]
RewriteRule .* - [E=ENV_UNIQUE_ID:%{ENV:UNIQUE_ID}]
&nbsp;
RequestHeader set AUTH_TYPE "%{IN_AUTH_TYPE}e"
RequestHeader set CONTENT_LENGTH "%{IN_CONTENT_LENGTH}e"
RequestHeader set CONTENT_TYPE "%{IN_CONTENT_TYPE}e"
RequestHeader set DATE_GMT "%{IN_DATE_GMT}e"
RequestHeader set DATE_LOCAL "%{IN_DATE_LOCAL}e"
RequestHeader set DOCUMENT_NAME "%{IN_DOCUMENT_NAME}e"
RequestHeader set DOCUMENT_PATH_INFO "%{IN_DOCUMENT_PATH_INFO}e"
RequestHeader set DOCUMENT_ROOT "%{IN_DOCUMENT_ROOT}e"
RequestHeader set DOCUMENT_URI "%{IN_DOCUMENT_URI}e"
RequestHeader set GATEWAY_INTERFACE "%{IN_GATEWAY_INTERFACE}e"
RequestHeader set LAST_MODIFIED "%{IN_LAST_MODIFIED}e"
RequestHeader set PATH_INFO "%{IN_PATH_INFO}e"
RequestHeader set PATH_TRANSLATED "%{IN_PATH_TRANSLATED}e"
RequestHeader set QUERY_STRING "%{IN_QUERY_STRING}e"
RequestHeader set QUERY_STRING_UNESCAPED "%{IN_QUERY_STRING_UNESCAPED}e"
RequestHeader set REMOTE_ADDR "%{IN_REMOTE_ADDR}e"
RequestHeader set REMOTE_HOST "%{IN_REMOTE_HOST}e"
RequestHeader set REMOTE_IDENT "%{IN_REMOTE_IDENT}e"
RequestHeader set REMOTE_PORT "%{IN_REMOTE_PORT}e"
RequestHeader set REMOTE_USER "%{IN_REMOTE_USER}e"
RequestHeader set REDIRECT_HANDLER "%{IN_REDIRECT_HANDLER}e"
RequestHeader set REDIRECT_QUERY_STRING "%{IN_REDIRECT_QUERY_STRING}e"
RequestHeader set REDIRECT_REMOTE_USER "%{IN_REDIRECT_REMOTE_USER}e"
RequestHeader set REDIRECT_STATUS "%{IN_REDIRECT_STATUS}e"
RequestHeader set REDIRECT_URL "%{IN_REDIRECT_URL}e"
RequestHeader set REQUEST_METHOD "%{IN_REQUEST_METHOD}e"
RequestHeader set REQUEST_URI "%{IN_REQUEST_URI}e"
RequestHeader set SCRIPT_FILENAME "%{IN_SCRIPT_FILENAME}e"
RequestHeader set SCRIPT_NAME "%{IN_SCRIPT_NAME}e"
RequestHeader set SCRIPT_URI "%{IN_SCRIPT_URI}e"
RequestHeader set SCRIPT_URL "%{IN_SCRIPT_URL}e"
RequestHeader set SERVER_ADMIN "%{IN_SERVER_ADMIN}e"
RequestHeader set SERVER_NAME "%{IN_SERVER_NAME}e"
RequestHeader set SERVER_ADDR "%{IN_SERVER_ADDR}e"
RequestHeader set SERVER_PORT "%{IN_SERVER_PORT}e"
RequestHeader set SERVER_PROTOCOL "%{IN_SERVER_PROTOCOL}e"
RequestHeader set SERVER_SIGNATURE "%{IN_SERVER_SIGNATURE}e"
RequestHeader set SERVER_SOFTWARE "%{IN_SERVER_SOFTWARE}e"
RequestHeader set UNIQUE_ID "%{IN_UNIQUE_ID}e"
RequestHeader set USER_NAME "%{IN_USER_NAME}e"
RequestHeader set TZ "%{IN_TZ}e"
RequestHeader set API_VERSION "%{IN_API_VERSION}e"
RequestHeader set HTTPS "%{IN_HTTPS}e"
RequestHeader set HTTP_ACCEPT "%{IN_HTTP_ACCEPT}e"
RequestHeader set HTTP_ACCEPT_CHARSET "%{IN_HTTP_ACCEPT_CHARSET}e"
RequestHeader set HTTP_ACCEPT_ENCODING "%{IN_HTTP_ACCEPT_ENCODING}e"
RequestHeader set HTTP_ACCEPT_LANGUAGE "%{IN_HTTP_ACCEPT_LANGUAGE}e"
RequestHeader set HTTP_CACHE_CONTROL "%{IN_HTTP_CACHE_CONTROL}e"
RequestHeader set HTTP_CONNECTION "%{IN_HTTP_CONNECTION}e"
RequestHeader set HTTP_COOKIE "%{IN_HTTP_COOKIE}e"
RequestHeader set HTTP_FORWARDED "%{IN_HTTP_FORWARDED}e"
RequestHeader set HTTP_HOST "%{IN_HTTP_HOST}e"
RequestHeader set HTTP_KEEP_ALIVE "%{IN_HTTP_KEEP_ALIVE}e"
RequestHeader set HTTP_PROXY_CONNECTION "%{IN_HTTP_PROXY_CONNECTION}e"
RequestHeader set HTTP_REFERER "%{IN_HTTP_REFERER}e"
RequestHeader set HTTP_USER_AGENT "%{IN_HTTP_USER_AGENT}e"
RequestHeader set IS_SUBREQ "%{IN_IS_SUBREQ}e"
RequestHeader set ORIG_PATH_INFO "%{IN_ORIG_PATH_INFO}e"
RequestHeader set ORIG_PATH_TRANSLATED "%{IN_ORIG_PATH_TRANSLATED}e"
RequestHeader set ORIG_SCRIPT_FILENAME "%{IN_ORIG_SCRIPT_FILENAME}e"
RequestHeader set ORIG_SCRIPT_NAME "%{IN_ORIG_SCRIPT_NAME}e"
RequestHeader set PATH "%{IN_PATH}e"
RequestHeader set PHP_SELF "%{IN_PHP_SELF}e"
RequestHeader set REQUEST_FILENAME "%{IN_REQUEST_FILENAME}e"
RequestHeader set REQUEST_TIME "%{IN_REQUEST_TIME}e"
RequestHeader set SCRIPT_GROUP "%{IN_SCRIPT_GROUP}e"
RequestHeader set SCRIPT_USER "%{IN_SCRIPT_USER}e"
RequestHeader set THE_REQUEST "%{IN_THE_REQUEST}e"
RequestHeader set TIME "%{IN_TIME}e"
RequestHeader set TIME_DAY "%{IN_TIME_DAY}e"
RequestHeader set TIME_HOUR "%{IN_TIME_HOUR}e"
RequestHeader set TIME_MIN "%{IN_TIME_MIN}e"
RequestHeader set TIME_MON "%{IN_TIME_MON}e"
RequestHeader set TIME_SEC "%{IN_TIME_SEC}e"
RequestHeader set TIME_WDAY "%{IN_TIME_WDAY}e"
RequestHeader set TIME_YEAR "%{IN_TIME_YEAR}e"
&nbsp;
SetEnvIfNoCase ^WWW-Auth "(.+)" HTTP_WWW_AUTHORIZATION=$1
SetEnvIfNoCase ^If "(.+)" HTTP_IF_MODIFIED_SINCE=$1
SetEnvIfNoCase ^If-None-Match$ "(.+)" HTTP_IF_NONE_MATCH=$1
SetEnvIfNoCase ^Cache-Control$ "(.+)" HTTP_CACHE_CONTROL=$1
SetEnvIfNoCase ^Connection$ "(.+)" HTTP_CONNECTION=$1
SetEnvIfNoCase ^Keep-Alive$ "(.+)" HTTP_KEEP_ALIVE=$1
SetEnvIfNoCase ^Authorization$ "(.+)" HTTP_AUTHORIZATION=$1
SetEnvIfNoCase ^Content-Type$ "(.+)" HTTP_CONTENT_TYPE=$1
SetEnvIfNoCase ^Content-Length$ "(.+)" HTTP_CONTENT_LENGTH=$1
SetEnvIfNoCase ^Authorization$ ".+username=\"([a-zA-Z0-9]+)\".+" REMOTE_USER=$1
SetEnvIfNoCase Server_Addr "(.+)" SERVER_ADDR=$1
SetEnvIfNoCase Request_Method "(.+)" REQUEST_METHOD=$1
SetEnvIfNoCase Request_Protocol "(.+)" REQUEST_PROTOCOL=$1
SetEnvIfNoCase Request_URI "(.+)" REQUEST_URI=$1
&nbsp;
RequestHeader set IF_MODIFIED_SINCE "%{HTTP_IF_MODIFIED_SINCE}e"
RequestHeader set IF_NONE_MATCH "%{HTTP_IF_NONE_MATCH}e"
RequestHeader set CACHE_CONTROL "%{HTTP_CACHE_CONTROL}e"
RequestHeader set CONNECTION "%{HTTP_CONNECTION}e"
RequestHeader set KEEP_ALIVE "%{HTTP_KEEP_ALIVE}e"
RequestHeader set AUTHORIZATION "%{HTTP_AUTHORIZATION}e"
RequestHeader set REMOTE_USER "%{REMOTE_USER}e"
RequestHeader set CONTENT_TYPE "%{HTTP_CONTENT_TYPE}e"
RequestHeader set CONTENT_LENGTH "%{HTTP_CONTENT_LENGTH}e"
RequestHeader set SERVER_ADDR "%{SERVER_ADDR}e"
RequestHeader set REQUEST_METHOD "%{REQUEST_METHOD}e"
RequestHeader set REQUEST_PROTOCOL "%{REQUEST_PROTOCOL}e"
RequestHeader set REQUEST_URI "%{REQUEST_URI}e"
&nbsp;
RequestHeader set UNIQUE_ID "%{ENV_UNIQUE_ID}e"
RequestHeader set SCRIPT_URL "%{ENV_SCRIPT_URL}e"
RequestHeader set SCRIPT_URI "%{ENV_SCRIPT_URI}e"
RequestHeader set PATH "%{ENV_PATH}e"
&nbsp;
Options +ExecCGI +FollowSymLinks
&nbsp;
Order Deny,Allow
Deny from All
Allow from 208.113.134.190  64.111.114.111 208.113.134.203 208.113.152.201 env=REDIRECT_STATUS
Satisfy Any
&nbsp;
SecFilterEngine Off</pre>



<h2>More Mod_Security (1)</h2>
<pre>#
# Order Deny,Allow
# First, all Allow directives are evaluated; at least one must match, or the request is rejected.
# Next, all Deny directives are evaluated. If any matches, the request is rejected.
# Last, any requests which do not match an Allow or a Deny directive are denied by default.
#
Order Allow,Deny
Allow from all
Deny from 217.219.
&nbsp;
#Order Deny,Allow
# First, all Deny directives are evaluated; if any match, the request is denied unless it also matches an Allow directive.
# Any requests which do not match any Allow or Deny directives are permitted.
&nbsp;
#SetEnvIf content-type (multipart/form-data)(.*) NEW_CONTENT_TYPE=application/x-www-form-urlencoded$2 OLD_CONTENT_TYPE=$1$2
#RequestHeader set content-type %{NEW_CONTENT_TYPE}e env=NEW_CONTENT_TYPE
SetEnvIfNoCase Content-Type "^multipart/form-data" !MODSEC_NOPOSTBUFFERING
SetEnvIfNoCase Content-Type "^application/x-www-form-urlencoded" !MODSEC_NOPOSTBUFFERING
SetEnv suppress-error-charset
SetEnvIfNoCase Content-Type "^multipart/form-data" !MODSEC_NOPOSTBUFFERING
&nbsp;
SetEnvIf Request_URI "^/(cgi-bin/search\.php|cgi-bin/java\.cgi|wp-admin/.*)" MODSEC_ENABLE=Off
SetEnvIf Request_URI "^/(online-tools/js-compress.*)" "MODSEC_NOPOSTBUFFERING=Do not buffer file uploads"
SetEnvIfNoCase Remote_Addr ^208\.113\.134\.190$ MODSEC_ENABLE=Off
SetEnvIfNoCase Remote_Addr ^64\.111\.114\.111$ MODSEC_ENABLE=Off
&nbsp;
### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#
#
# TZ: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
SetEnv TZ America/Indianapolis
&nbsp;
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
SetEnv SERVER_ADMIN webmaster@askapache.com
&nbsp;
#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
ServerSignature Off
&nbsp;
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.0/mod/core.html#options
# for more information.
#
Options -Indexes -Includes -ExecCGI -MultiViews
&nbsp;
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
DirectoryIndex index.php
&nbsp;
#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
Action php5-cgi /bin/php.cgi
&nbsp;
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler php5-cgi .php .inc
&nbsp;
#
# Commonly used filename extensions to character sets. You probably
# want to avoid clashes with the language extensions, unless you
# are good at carefully testing your setup after each change.
# See http://www.iana.org/assignments/character-sets for the
# official list of charset names and their respective RFCs.
#
AddDefaultCharset UTF-8
&nbsp;
#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#
AddType &#039;application/rdf+xml; charset=UTF-8&#039; .rdf
AddType &#039;application/xhtml+xml; charset=UTF-8&#039; .xhtml
AddType &#039;application/xhtml+xml; charset=UTF-8&#039; .xhtml.gz
AddType &#039;text/html; charset=UTF-8&#039; .html
AddType &#039;text/html; charset=UTF-8&#039; .html.gz
AddType application/octet-stream .rar .chm .bz2 .tgz .msi .pdf .exe
AddType application/vnd.ms-excel .csv
AddType application/x-httpd-php-source .phps
AddType application/x-pilot .prc .pdb
AddType application/x-shockwave-flash .swf
AddType application/xrds+xml .xrdf
AddType text/plain .ini .sh .bsh .bash .awk .nawk .gawk .csh .var .c .in .h .asc .md5 .sha .sha1
AddType video/x-flv .flv
&nbsp;
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
&nbsp;
#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/html</pre>




<h2>Error Documents</h2>
<pre>#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
#100 Continue
#101 Switching Protocols
#102 Processing
#200 OK
#201 Created
#202 Accepted
#203 Non-Authoritative Information
#204 No Content
#205 Reset Content
#206 Partial Content
#207 Multi-Status
#300 Multiple Choices
#301 Moved Permanently
#302 Found
#303 See Other
#304 Not Modified
#305 Use Proxy
#306 unused
#307 Temporary Redirect
#400 Bad Request
#401 Authorization Required
#402 Payment Required
#403 Forbidden
#404 Not Found
#405 Method Not Allowed
#406 Not Acceptable
#407 Proxy Authentication Required
#408 Request Time-out
#409 Conflict
#410 Gone
#411 Length Required
#412 Precondition Failed
#413 Request Entity Too Large
#414 Request-URI Too Large
#415 Unsupported Media Type
#416 Requested Range Not Satisfiable
#417 Expectation Failed
#418 unused
#419 unused
#420 unused
#421 unused
#422 Unprocessable Entity
#423 Locked
#424 Failed Dependency
#425 No code
#426 Upgrade Required
#500 Internal Server Error
#501 Method Not Implemented
#502 Bad Gateway
#503 Service Temporarily Unavailable
#504 Gateway Time-out
#505 HTTP Version Not Supported
#506 Variant Also Negotiates
#507 Insufficient Storage
#508 unused
#509 unused
#510 Not Extended
&nbsp;
#ErrorDocument 100 /e/100_CONTINUE.html
#ErrorDocument 101 /e/101_SWITCHING_PROTOCOLS.html
#ErrorDocument 102 /e/102_PROCESSING.html
&nbsp;
#ErrorDocument 200 /e/200_OK.html
#ErrorDocument 201 /e/201_CREATED.html
#ErrorDocument 202 /e/202_ACCEPTED.html
#ErrorDocument 203 /e/203_NON_AUTHORITATIVE.html
#ErrorDocument 204 /e/204_NO_CONTENT.html
#ErrorDocument 205 /e/205_RESET_CONTENT.html
#ErrorDocument 206 /e/206_PARTIAL_CONTENT.html
#ErrorDocument 207 /e/207_MULTI_STATUS.html
&nbsp;
#ErrorDocument 300 /e/300_MULTIPLE_CHOICES.html
#ErrorDocument 301 /e/301_MOVED_PERMANENTLY.html
#ErrorDocument 302 /e/302_MOVED_TEMPORARILY.html
#ErrorDocument 303 /e/303_SEE_OTHER.html
#ErrorDocument 304 /e/304_NOT_MODIFIED.html
#ErrorDocument 305 /e/305_USE_PROXY.html
#ErrorDocument 307 /e/307_TEMPORARY_REDIRECT.html
&nbsp;
ErrorDocument 400 /e/400_BAD_REQUEST.html
ErrorDocument 401 /e/401_UNAUTHORIZED.html
ErrorDocument 402 /e/402_PAYMENT_REQUIRED.html
ErrorDocument 403 /e/403_FORBIDDEN.html
#ErrorDocument 404 /e/404_NOT_FOUND.html
ErrorDocument 404 /index.php?error=404
ErrorDocument 405 /e/405_METHOD_NOT_ALLOWED.html
ErrorDocument 406 /e/406_NOT_ACCEPTABLE.html
ErrorDocument 407 /e/407_PROXY_AUTHENTICATION_REQUIRED.html
ErrorDocument 408 /e/408_REQUEST_TIME_OUT.html
ErrorDocument 409 /e/409_CONFLICT.html
ErrorDocument 410 /e/410_GONE.html
ErrorDocument 411 /e/411_LENGTH_REQUIRED.html
ErrorDocument 412 /e/412_PRECONDITION_FAILED.html
ErrorDocument 413 /e/413_REQUEST_ENTITY_TOO_LARGE.html
ErrorDocument 414 /e/414_REQUEST_URI_TOO_LARGE.html
ErrorDocument 415 /e/415_UNSUPPORTED_MEDIA_TYPE.html
ErrorDocument 416 /e/416_RANGE_NOT_SATISFIABLE.html
ErrorDocument 417 /e/417_EXPECTATION_FAILED.html
ErrorDocument 422 /e/422_UNPROCESSABLE_ENTITY.html
ErrorDocument 423 /e/423_LOCKED.html
ErrorDocument 424 /e/424_FAILED_DEPENDENCY.html
ErrorDocument 426 /e/426_UPGRADE_REQUIRED.html
ErrorDocument 500 /e/500_INTERNAL_SERVER_ERROR.html
ErrorDocument 501 /e/501_NOT_IMPLEMENTED.html
ErrorDocument 502 /e/502_BAD_GATEWAY.html
ErrorDocument 503 /e/503_SERVICE_UNAVAILABLE.html
ErrorDocument 504 /e/504_GATEWAY_TIME_OUT.html
ErrorDocument 505 /e/505_VERSION_NOT_SUPPORTED.html
ErrorDocument 506 /e/506_VARIANT_ALSO_VARIES.html
ErrorDocument 507 /e/507_INSUFFICIENT_STORAGE.html
ErrorDocument 510 /e/510_NOT_EXTENDED.html</pre>



<h2>Caching</h2>
<pre>#
#  HEADERS and CACHING
#
Header unset Pragma
FileETag None
Header unset ETag
&nbsp;
# 1 YEAR
&lt;filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"&gt;
Header unset P3P
Header unset Pragma
FileETag None
Header unset ETag
Header set Cache-Control "public,max-age=29030400"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
Header unset Last-Modified
&lt;/filesMatch&gt;
&nbsp;
# 2 HOURS
&lt;filesMatch "\.(html|htm|xml|txt|xsl|rdf|rss)$"&gt;
&lt;ifModule mod_expires.c&gt;
ExpiresActive On
ExpiresDefault A3600
&lt;/ifModule&gt;
&lt;/filesMatch&gt;</pre>



<h2>Redirect Hack</h2>
<pre>#Redirect 400 /e/400
#Redirect 401 /e/401
#Redirect 402 /e/402
#Redirect 403 /e/403
Redirect 404 /index.php?error=404
#Redirect 405 /e/405
#Redirect 406 /e/406
#Redirect 407 /e/407
#Redirect 408 /e/408
#Redirect 409 /e/409
#Redirect 410 /e/410
#Redirect 411 /e/411
#Redirect 412 /e/412
#Redirect 413 /e/413
#Redirect 414 /e/414
#Redirect 415 /e/415
#Redirect 416 /e/416
#Redirect 417 /e/417
#Redirect 418 /e/418
#Redirect 419 /e/419
#Redirect 420 /e/420
#Redirect 421 /e/421
#Redirect 422 /e/422
#Redirect 423 /e/423
#Redirect 424 /e/424
#Redirect 425 /e/425
#Redirect 426 /e/426
#Redirect 500 /e/500
#Redirect 501 /e/501
#Redirect 502 /e/502
#Redirect 503 /e/503
#Redirect 504 /e/504
#Redirect 505 /e/505
#Redirect 506 /e/506
#Redirect 507 /e/507
#Redirect 508 /e/508
#Redirect 509 /e/509
#Redirect 510 /e/510</pre>

<h2>301 PERMANENT REDIRECTS</h2>
<pre>#
# Redirect allows you to tell clients about documents which used to exist in
# your server&#039;s namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
#
Redirect 301 /12-lessons-for-those-afraid-of-css.html http://www.askapache.com/css/12-lessons-for-those-afraid-of-css.html
Redirect 301 /2006/htaccess/htaccesselite-ultimate-htaccess-article.html http://www.askapache.com/htaccess/apache-htaccess.html
Redirect 301 /2007/phpbb/sending-post-form-data-with-php-curl.html http://www.askapache.com/htaccess/sending-post-form-data-with-php-curl.html
Redirect 301 /2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html http://www.askapache.com/dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html
Redirect 301 /2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html http://www.askapache.com/dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html
Redirect 301 /2007/webmaster/php-and-ajax-shell-console.html http://www.askapache.com/tools/php-and-ajax-shell-console.html
Redirect 301 /27-request-methods-for-use-with-apache-and-rewritecond-and-htaccess.html http://www.askapache.com/htaccess/27-request-methods-for-use-with-apache-and-rewritecond-and-htaccess.html
Redirect 301 /404-google-wordpress-plugin.html http://www.askapache.com/seo/404-google-wordpress-plugin.html
Redirect 301 /503-service-temporarily-unavailable.html http://www.askapache.com/htaccess/503-service-temporarily-unavailable.html
Redirect 301 /Overview-about.rdf http://www.askapache.com/askapache-home.rdf
Redirect 301 /abbr-acronym.html http://www.askapache.com/xhtml/abbr-acronym.html
Redirect 301 /adsense-robots.html http://www.askapache.com/google/adsense-robots.html
Redirect 301 /alexa-toolbar-firefox.html http://www.askapache.com/tools/alexa-toolbar-firefox.html
Redirect 301 /allowing-access-from-1-static-ip-and-deny-the-rest.html http://www.askapache.com/htaccess/apache-htaccess.html
Redirect 301 /anti-virus-spyware-rootkit.html http://www.askapache.com/security/anti-virus-spyware-rootkit.html
Redirect 301 /apache-ssl-in-htaccess-examples.html http://www.askapache.com/htaccess/apache-ssl-in-htaccess-examples.html
Redirect 301 /awk-tutorial.html http://www.askapache.com/awk/awk-tutorial.html
Redirect 301 /best-adsense-optimization.html http://www.askapache.com/wordpress/best-adsense-optimization.html
Redirect 301 /commonly-used-htaccess-code-examples.html http://www.askapache.com/htaccess/commonly-used-htaccess-code-examples.html
Redirect 301 /css-background-image-sprite.html http://www.askapache.com/css/css-background-image-sprite.html
Redirect 301 /css-browser-screenshots.html http://www.askapache.com/tools/css-browser-screenshots.html
Redirect 301 /css-class-example.html http://www.askapache.com/css/css-class-example.html
Redirect 301 /curl-multi-downloads.html http://www.askapache.com/php/curl-multi-downloads.html
Redirect 301 /custom-boot-menu-in-windows-xp.html http://www.askapache.com/windows/custom-boot-menu-in-windows-xp.html
Redirect 301 /donate http://www.dreamhost.com/donate.cgi?id=8261
Redirect 301 /donate/ http://www.dreamhost.com/donate.cgi?id=8261
Redirect 301 /htaccess.txt http://z.askapache.com/p/htaccess.txt
Redirect 301 /htaccess/404-errorpages.html http://www.askapache.com/seo/google-ajax-search-seo-tips.html
Redirect 301 /htaccess/feedsmith http://www.askapache.com/htaccess/feedsmith-htaccess.html
Redirect 301 /htaccess/http-status-codes.html http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html
Redirect 301 /htaccess/instruct-search-engines-to-come-back-to-site-after-you-finish-working-on-it.html http://www.askapache.com/htaccess/503-service-temporarily-unavailable.html
Redirect 301 /htaccess/speed-up-the-apache-web-server-with-configuration-hacks.html http://www.askapache.com/htaccess/apache-web-server-speed-configuration-hacks.html
Redirect 301 /instruct-search-engines-to-come-back-to-site-after-you-finish-working-on-it.html http://www.askapache.com/htaccess/503-service-temporarily-unavailable.html
Redirect 301 /security/bypassing-vlan.html http://www.askapache.com/security/hacking-vlan-switched-networks.html
Redirect 301 /security/bypassing-vlanbypassing-vlan.html http://www.askapache.com/security/hacking-vlan-switched-networks.html
Redirect 301 /security/rigging-the-dreamhost-site-of-the-month-contest.html http://www.askapache.com/dreamhost/rigging-the-dreamhost-site-of-the-month-contest.html
Redirect 301 /seo/tailrankcom-robot.html http://www.askapache.com/seo/tailrank-robot.html
Redirect 301 /webmaster/caching-tutorial-for-webmasters.html http://www.askapache.com/htaccess/caching-tutorial-for-webmasters.html
Redirect 301 /webmaster/lft-traceroute-tool.html http://www.askapache.com/tools/lft-traceroute-tool.html</pre>



<h2>301 PERMANENT REDIRECTMATCH</h2>
<pre>#
#  PERMANENT REDIRECTMATCH
#
#RedirectMatch 301 ^/&amp;(.*)$ http://www.askapache.com/
RedirectMatch 301 ^/(.+)\.html/$ http://www.askapache.com/$1.html
RedirectMatch 301 ^/&amp;amp(.*)$ http://www.askapache.com/
RedirectMatch 301 ^/.*feed\.gif$ http://z.askapache.com/feed.gif
RedirectMatch 301 ^/([^/]+)//$ http://www.askapache.com/$1/
RedirectMatch 301 ^/(.+)/htaccesselite-ultimate-htaccess-article.html(.*) http://www.askapache.com/htaccess/apache-htaccess.html
RedirectMatch 301 ^/(.+)\.html/([a-z][a-z])/$ http://www.askapache.com/$1.html
RedirectMatch 301 ^/([\(]+)(.*)$ http://www.askapache.com/
RedirectMatch 301 ^/([^9]*)9O1X.3y(.*)/(.*)$ http://www.askapache.com/$2
RedirectMatch 301 ^/.3y(.*)$ http://www.askapache.com/
RedirectMatch 301 ^/200([0-9])/([0-9])(.*)$ http://www.askapache.com/top-100/
RedirectMatch 301 ^/200([0-9])/([^01])(.*)$ http://www.askapache.com/$2$3
RedirectMatch 301 ^/about/glossary(.*)$ http://www.askapache.com/glossary$1
RedirectMatch 301 ^/apache-speed(.*)$ http://www.askapache.com/htaccess/apache-speed$1
RedirectMatch 301 ^/category/(.+)$ http://www.askapache.com/$1
RedirectMatch 301 ^/docs/(.*)$ http://askapache.info/$1
RedirectMatch 301 ^/htaccess/feedsmith-htaccess(.*) http://www.askapache.com/htaccess/redirecting-wordpress-feeds-to-feedburner.html
RedirectMatch 301 ^/robots-txt(.*)$ http://www.askapache.com/robots.txt
RedirectMatch 301 ^/hosting/?$ http://www.askapache.com/hosting/
RedirectMatch 301 ^/.+favicon.ico$ http://www.askapache.com/favicon.ico
#RedirectMatch 301 ^/wp-content/uploads/(.*)$ http://z.askapache.com/uploads/$1
#RedirectMatch 301 ^/z/(.+)$ http://z.askapache.com/$1
#RedirectMatch 301 ^/(z|t|i|j|c|p)/(.*)$ http://z.askapache.com/$1/$2
&nbsp;
#
#  TEMPORARY REDIRECTMATCH
#
RedirectMatch 307 ^/getflash/?$ http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash
RedirectMatch 307 ^/dream/?$ http://www.askapache.com/dreamhost/
RedirectMatch 307 ^/(cse|apachecse|apachecsetest|apachesearch)/?$ http://www.google.com/coop/cse?cx=002660089121042511758%3Akk7rwc2gx0i
RedirectMatch 307 ^/search/lr-lang(.*)$ http://feeds.askapache.com/apache/htaccess
&nbsp;
#
#  PERMANENT GONE
#
RedirectMatch 410 ^/funny(.*)</pre>






<h2>My Favorite modsec_v1 stuff</h2>
<pre># Pass: Allows request to continue, further filters could still halt request.
# Allow: Allows matching requests through, will not be tested against other filters.
# Deny: Stops the request outright, returns a HTTP 500 error code by default.
# Status: Used to specify an alternate HTTP error code.
# Redirect: Matching requests are redirected to the provided URL.
# Exec: Allows execution of a local system binary or script.
# Log: Logs request only.
# Nolog: Does not log request.
# Chain: Allows you to create list of filters for more granulated security. All filters must be cleared before action is taken with the final filter.
&nbsp;
SecFilterEngine On
SecFilterCheckURLEncoding On
SecFilterCheckUnicodeEncoding Off
SecFilterScanPOST On
&nbsp;
#SecUploadKeepFiles On
#SecUploadDir /home/askapache/sites/askapache.com/logs/sec-upload
#SecUploadApproveScript /home/askapache/sites/askapache.com/htdocs/cgi-bin/check.sh
&nbsp;
#SecRuleEngine On
#SecAuditEngine On
#SecAuditEngine Off
SecAuditEngine RelevantOnly
SecAuditLog /home/askapache/sites/askapache.com/logs/modsec_audit.log
SecFilterDebugLog /home/askapache/sites/askapache.com/logs/modsec_debug.log
SecFilterDebugLevel 1
#SecAuditLogRelevantStatus "^(?:1|2(?!00)|5|4(?!04))"
SecAuditLogRelevantStatus "^(1|2(?!00)|4([0-9](0|1|2|5|6|7|8|9))|5)"
SecFilterForceByteRange 1 255
&nbsp;
#SecFilterInheritance Off
# 0 EMERGENCY - system is unusable
# 1 ALERT - action must be taken immediately
# 2 CRITICAL - critical conditions
# 3 ERROR - error conditions
# 4 WARNING - warning conditions
# 5 NOTICE - normal but significant conditions
# 6 INFO - informational
# 7 DEBUG - debug-level messages
&nbsp;
SecFilterDefaultAction "deny,severity:6,status:403"
&nbsp;
#SecFilterSelective REQUEST_METHOD "POST" "pass,auditlog,severity:6"
SecFilterSelective REQUEST_URI "^/(xmlrpc|wp-comments-post)\.php" "pass,log,auditlog,severity:6"
#SecFilterSelective REMOTE_ADDR ^$ "pass,log,auditlog,severity:6"
#SecFilterSelective REMOTE_ADDR ^203\.221\.91\.20$ "pass,log,auditlog,severity:6"
&nbsp;
#SecFilterSelective REQUEST_URI "^/htaccess.*" "pass,log,auditlog"
#SecFilterSelective REQUEST_URI "^/feed.*" "pass,log,auditlog"
#SecFilterSelective REQUEST_URI "^/.*trackback.*" "pass,log,auditlog"
#SecFilterSelective REQUEST_URI "^/valid.*" "pass,log,auditlog"
&nbsp;
#Enforce proper HTTP requests
SecFilterSelective SERVER_PROTOCOL "!^HTTP/(0\.9|1\.0|1\.1)$" "id:340000,rev:1,severity:6,msg:&#039;Bad HTTP Protocol&#039;"
&nbsp;
# Only accept request encodings we know how to handle
SecFilterSelective REQUEST_METHOD "!^(GET|HEAD|POST)$" "chain,id:340001,rev:1,severity:6,msg:&#039;Restricted HTTP function,status:405&#039;"
SecFilterSelective HTTP_Content-Type "!(^$|^application/x-www-form-urlencoded$|^multipart/form-data)"
&nbsp;
# Require Content-Length to be provided with every POST request
SecFilterSelective REQUEST_METHOD "^POST$" "chain,id:340003,rev:1,severity:6,msg:&#039;Content Length not provided with POST&#039;,status:411"
SecFilterSelective HTTP_Content-Length "^$"
&nbsp;
# Don&#039;t accept transfer encodings we know we don&#039;t handle
# (and you don&#039;t need it anyway)
SecFilterSelective HTTP_Transfer-Encoding "!^$" "id:340004,rev:1,severity:6,msg:&#039;Dis-allowed Transfer Encoding&#039;"
&nbsp;
#Generic rule for allowed characters, adjust for your site before activating
##SecFilterSelective REQUEST_URI "!^[a-zA-Z0-9\.\+\_\/\-\?\=\&amp;\%\#]+$" "chain,id:390002,rev:1,severity:4,msg:&#039;Restricted HTTP character set&#039;"
##SecFilterSelective REQUEST_URI "!^/(openid|wp-admin|wp-includes|wp-content|wp-login.php)"
&nbsp;
#HTTP response splitting generic sigs
#SecFilter "Content-Length\:.*Content-Type\:.*Content-Type\:" "id:340005,rev:1,severity:4,msg:&#039;HTTP response splitting&#039;"
&nbsp;
#HTTP response splitting generic sigs
#SecFilter "Content-Length\:" "chain,id:340006,rev:1,severity:4,msg:&#039;HTTP response splitting&#039;"
#SecFilter "Content-Type\:"
&nbsp;
#catch smuggling attacks
#SecFilter "^(GET|POST).*Host:.*^(GET|POST)"  "id:300012,rev:1,severity:4,msg:&#039;catch smuggling attacks&#039;"
&nbsp;
#XSS insertion into Content-Type
#SecFilterSelective THE_REQUEST "Content-Type\:.*(&lt;[[:space:]]*(script|about|applet|activex|chrome)*&gt;.*(script|about|applet|activex|chrome)[[:space:]]*&gt;|onmouseover=|javascript\:)" "id:300002,rev:1,severity:4,msg:&#039;XSS attack in Content-type header&#039;"
&nbsp;
#Code injection via content length
#SecFilterSelective HTTP_Content-Length|HTTP_USER_AGENT "\;(system|passthru|exec)\(" "id:330003,rev:1,severity:4,msg:&#039;Code Injection in Content-Length header&#039;"
&nbsp;
#Don&#039;t accept chunked encodings modsecurity can not look at these, so this is a hole that can bypass your rules, the rule before this one should cover this, but hey paranoia is cheap
#SecFilterSelective HTTP_Transfer-Encoding "chunked" "id:300003,rev:1,severity:4,msg:&#039;Chunked Transfer Encoding denied&#039;"
&nbsp;
##generic recursion signatures
#SecFilterSelective REQUEST_URI "\.\./\.\./" "id:300004,rev:2,severity:4,msg:&#039;Generic Path Recursion1 denied&#039;"
#SecFilterSelective THE_REQUEST "\.\|\./\.\|\./\.\|" "id:300005,rev:1,severity:4,msg:&#039;Generic Path Recursion2 denied&#039;"
#SecFilterSelective THE_REQUEST "\.\.\./" "id:300006,rev:1,severity:4,msg:&#039;Bogus Path denied&#039;"
&nbsp;
#Generic PHP exploit signatures
#SecFilterSelective REQUEST_URI "&lt;\?php (chr|fwrite|fopen|system|echr|passthru|popen|proc_open|shell_exec|exec|proc_nice|proc_terminate|proc_get_status|proc_close|pfsockopen|leak|apache_child_terminate|posix_kill|posix_mkfifo|posix_setpgid|posix_setsid|posix_setuid|phpinfo)\(.*\)\;" "id:330002,rev:1,severity:4,msg:&#039;Generic PHP exploit pattern denied&#039;"
&nbsp;
#Prevent SQL injection in cookies
##SecFilterSelective COOKIE_VALUES "((select|grant|delete|insert|drop|alter|replace|truncate|update|create|rename|describe)[[:space:]]+[A-Z|a-z|0-9|\*| |\,]+[[:space:]]+(from|into|table|database|index|view)[[:space:]]+[A-Z|a-z|0-9|\*| |\,]|UNION SELECT.*\&#039;.*\&#039;.*,[0-9].*INTO.*FROM)" "id:300011,rev:1,severity:4,msg:&#039;Generic SQL injection in cookie&#039;"
&nbsp;
#Prevent SQL injection in UA
##SecFilterSelective HTTP_USER_AGENT "((select|grant|delete|insert|drop|alter|replace|truncate|update|create|rename|describe)[[:space:]]+[A-Z|a-z|0-9|\*| |\,]+[[:space:]]+(from|into|table|database|index|view)[[:space:]]+[A-Z|a-z|0-9|\*| |\,]|UNION SELECT.*\&#039;.*\&#039;.*,[0-9].*INTO.*FROM)" "id:300012,rev:1,severity:4,msg:&#039;Generic SQL injection in User Agent header&#039;"
&nbsp;
# Generic filter to prevent SQL injection attacks
# Understand that all SQL filters are very limited and are very difficult to prevent false postives and negatives.
# Please report false positives/negatives to mike@gotroot.com
#SecFilter "((select|grant|delete|insert|drop|alter|replace|truncate|update|create|rename|describe)[[:space:]]+[A-Z|a-z|0-9|\*| |\,]+[[:space:]]+(from|into|table|database|index|view)[[:space:]]+[A-Z|a-z|0-9|\*| |\,]|UNION SELECT.*\&#039;.*\&#039;.*,[0-9].*INTO.*FROM)" "id:300013,rev:1,severity:4,msg:&#039;Generic SQL injection protection&#039;"
&nbsp;
#generic XSS PHP attack types
##SecFilterSelective REQUEST_URI "\.php\?" "chain,id:300010,rev:1,severity:4,msg:&#039;Generic PHP XSS exploit pattern denied&#039;"
#SecFilter "(javascript\:/(.*new\x20ActiveXObject.*Sh\.regwrite|.*window\.opener\.document\.body.\innerHTML=window\.opener\.document\.body\.innerHTML\.replace)|onmouseover=\&#039;javascript)"
&nbsp;
#Generic XSS filter
#please report false positives
##SecFilterSelective REQUEST_URI "!/mt\.cgi" "chain,msg:&#039;XSS2&#039;"
#SecFilter "&lt;[[:space:]]*(script|about|applet|activex|chrome)*&gt;.*(script|about|applet|activex|chrome)[[:space:]]*&gt;"
&nbsp;
#XSS in referrer and UA headers
##SecFilterSelective HTTP_REFERER|HTTP_USER_AGENT "&lt;[[:space:]]*(script|about|applet|activex|chrome)*&gt;.*(script|about|applet|activex|chrome)[[:space:]]*&gt;" "msg:&#039;XSS3&#039;"
&nbsp;
#HTTP header PHP code injection attacks
##SecFilterSelective HTTP_CLIENT_IP|HTTP_USER_AGENT|HTTP_Referer "(&lt;\?php|&lt;[[:space:]]?\?[[:space:]]?php|&lt;\? php)" "msg:&#039;PHP1&#039;"
&nbsp;
#Generic PHP remote file injection
##SecFilterSelective REQUEST_URI "!(/do_command)" "chain,msg:&#039;PHP2&#039;"
##SecFilterSelective REQUEST_URI "\.php\?.*=(https?|ftp)\:/.*(cmd|command)="
&nbsp;
#script, perl, etc. code in HTTP_Referer string
##SecFilterSelective HTTP_Referer "\#\!.*/" "msg:&#039;perl script1&#039;"
&nbsp;
#remote file inclusion generic attack signature
#SecFilterSelective THE_REQUEST  "\.(dat|gif|jpg|png|bmp|txt|vir|dot)\?" "chain,msg:&#039;remote 1&#039;"
#SecFilter "((name|pm_path|pagina|path|include_location|root|page|open)=(http|https|ftp)|(cmd|command|inc)=)"
&nbsp;
#remote file inclusion generic attack signature
#SecFilterSelective THE_REQUEST  "\.(dat|gif|jpg|png|bmp|txt|vir|dot)\?\&amp;(cmd|command|inc|name)=" "msg:&#039;remote2&#039;"
&nbsp;
#remote file inclusion generic attack signature
#SecFilterSelective ARGS  "\.(dat|gif|jpg|png|bmp|txt|vir|dot)" "chain,msg:&#039;file inclusion1&#039;"
#SecFilter "\?\&amp;(cmd|inc|name)="
&nbsp;
#remote file inclusion generic attack signature
#SecFilterSelective ARGS  "\.(dat|gif|jpg|png|bmp|txt|vir|dot)\?\&amp;(cmd|inc|name)=" "msg:&#039;file inclusion2&#039;"
&nbsp;
#remote file inclusion generic attack signature
#SecFilterSelective REQUEST_URI  "\.php\?.*=(http|https|ftp)\:/.*\?&amp;cmd=" "msg:&#039;file inclusion3&#039;"
&nbsp;
#Bogus file extensions generic signature
#SecFilterSelective THE_REQUEST  "[A-Za-z0-9]\.(gif|jpg|png|bmp)\.txt" "msg:&#039;file extension&#039;"
&nbsp;
#PHP remote path attach generic signature
#SecFilterSelective REQUEST_URI  "\.ph(p(3|4)?).*path=(http|https|ftp)\:/" "msg:&#039;remote path1&#039;"
#SecFilterSelective REQUEST_URI  "\.php.*path=(http|https|ftp)\:/" "msg:&#039;remote path2&#039;"
&nbsp;
#generic php attack sigs
#SecFilterSelective REQUEST_URI "(&amp;(cmd|command)=(id|uname)\x20|cmd\?(cmd|command)=|(spy|cmd|cmd_out|sh)\.(gif|jpg|png|bmp|txt)\?&amp;(cmd|command)=|\.php\?&amp;(cmd|command)=)" "msg:&#039;php attack1&#039;"
&nbsp;
# WEB-MISC apache directory disclosure attempt
#SecFilterSelective THE_REQUEST "////" "msg:&#039;apache directory disclosure&#039;"
&nbsp;
#PHP defenses
##SecFilterSelective ARG_PHPSESSID "!^$" "msg:&#039;something in phpsessid&#039;"
##SecFilterSelective COOKIE_PHPSESSID "!^$" "msg:&#039;something in cookie phpsessid&#039;"
&nbsp;
#PHP defenses
##SecFilterSelective COOKIE_ASKAPACHEID "!^[0-9a-z]*$" "msg:&#039;bad value for cookie&#039;"
&nbsp;
#cross site scripting attempt TYPE + JAVASCRIPT
##SecFilterSelective THE_REQUEST "TYPE\s*=\s*[\&#039;\"]text\/javascript" "msg:&#039;cross-site1&#039;"
&nbsp;
#cross site scripting attempt STYLE + JAVASCRIPT
##SecFilterSelective THE_REQUEST "TYPE\s*=\s*[\&#039;\"]application\/x-javascript" "msg:&#039;cross-site1&#039;"
&nbsp;
#cross site scripting attempt STYLE + JSCRIPT
##SecFilterSelective THE_REQUEST "TYPE\s*=\s*[\&#039;\"]text\/jscript" "msg:&#039;cross-site1&#039;"
&nbsp;
# cross site scripting attempt STYLE + VBSCRIPT
##SecFilterSelective THE_REQUEST "TYPE\s*=\s*[\&#039;\"]text\/vbscript" "msg:&#039;cross-site1&#039;"
&nbsp;
#cross site scripting attempt STYLE + VBSCRIPT
##SecFilterSelective THE_REQUEST "TYPE\s*=\s*[\&#039;\"]application\/x-vbscript" "msg:&#039;cross-site1&#039;"
&nbsp;
#cross site scripting attempt STYLE + ECMACRIPT
##SecFilterSelective THE_REQUEST "TYPE\s*=\s*[\&#039;\"]text\/ecmascript" "msg:&#039;cross-site1&#039;"
&nbsp;
# cross site scripting attempt STYLE + EXPRESSION
##SecFilterSelective THE_REQUEST "STYLE[\s]*=[\s]*[^&gt;]expression[\s]*\(" "msg:&#039;cross-site1&#039;"
&nbsp;
#cross site scripting attempt STYLE + EXPRESSION
##SecFilterSelective THE_REQUEST "[\s]*expression[\s]*\([^}]}[\s]*&lt;\/STYLE&gt;" "msg:&#039;cross-site1&#039;"
&nbsp;
# cross site scripting attempt using XML
##SecFilterSelective THE_REQUEST "&lt;!\[CDATA\[&lt;\]\]&gt;SCRIPT" "msg:&#039;cross-site1&#039;"
&nbsp;
#cross site scripting attempt executing hidden Javascript
##SecFilterSelective THE_REQUEST "eval[\s]*\([\s]*[^\.]\.innerHTML[\s]*\)" "msg:&#039;cross-site1&#039;"
&nbsp;
#cross site scripting attempt executing hidden Javascript
##SecFilterSelective THE_REQUEST "window\.execScript[\s]*\(" "msg:&#039;cross-site1&#039;"
&nbsp;
#cross site scripting attempt to execute Javascript code
###SecFilterSelective THE_REQUEST "/(((URL|SRC|HREF|LOWSRC)[\s]*=)|(url[\s]*[\(]))[\s]*[\&#039;\"]*javascript[\:]" "msg:&#039;cross-site1&#039;"
&nbsp;
#cross site scripting HTML Image tag set to javascript attempt
#SecFilterSelective THE_REQUEST "img src=javascript" "msg:&#039;cross-site1&#039;"
&nbsp;
#Fake image file shell attacvk
#SecFilterSelective HTTP_Content-Type "image/.*" "msg:&#039;image shell 1&#039;"
#SecFilterSelective POST_PAYLOAD "chr\(" "msg:&#039;image shell2&#039;"
&nbsp;
#bogus graphics file
#SecFilterSelective HTTP_Content-Disposition "\.php"  "chain,msg:&#039;bogus graphics&#039;"
#SecFilterSelective HTTP_Content-Type "(image/gif|image/jpg|image/png|image/bmp)"
&nbsp;
# Allow only letters, digits, underscore, and square brackets (for arrays)
# in variable names#
#SecFilterSelective ARGS_NAMES "!^[][a-zA-Z0-9_]+$"
&nbsp;
#---------------------------------------------
# reject keywords that appear in POST or GET
#=============================================
SecFilterSignatureAction "nolog,auditlog,deny,severity:6,status:403"
&nbsp;
SecFilterSelective REQUEST_URI  "^/.*/wp-comments-post\.php" "id:50200,msg:&#039;WORDPRESS SPAM bad wp-comments-post location&#039;"
&nbsp;
&lt;files wp-comments-post.php&gt;
# fail for empty comment fields
SecFilterSelective "ARG_comment_post_ID|ARG_submit" "^$" "id:50300,msg:&#039;WORDPRESS SPAM MISSING comment_post_ID&#039;"
SecFilterSelective "ARG_comment_post_ID" "!^[0-9]{1,6}$" "id:50301,msg:&#039;WORDPRESS SPAM BAD comment_post_ID&#039;"
SecFilterSelective "HTTP_Cookie" "^$" "id:50302,msg:&#039;WORDPRESS SPAM No cookie&#039;"
&nbsp;
##SecFilterSelective "comment_post_DI" "^$" "id:50310,msg:&#039;WORDPRESS SPAM MISSING comment_post_DI&#039;"
##SecFilterSelective "comment_post_DI" "!^[0-9]{1,2}$" "id:50311,msg:&#039;WORDPRESS SPAM MISSING comment_post_DI&#039;"
&lt;/files&gt;
&lt;pre&gt;
&nbsp;
&lt;h2&gt;MODSEC Continued.. Custom Anti-Spam (WordPress) I made&lt;/h2&gt;
&lt;pre&gt;
SecFilterSignatureAction "nolog,noauditlog,deny,severity:6,redirect:http://www.askapache.com/feed/"
SecFilterSelective ARGS|THE_REQUEST "00bp\.com|360\.yahoo|987mb\.com|Ambien|American airline" "id:50010,msg:&#039;SPAM 10&#039;
SecFilterSelective ARGS|THE_REQUEST "Ativan|Caresoprodol|Darvocet|Ephedra|Ephedrine" "id:50011,msg:&#039;SPAM 11&#039;
SecFilterSelective ARGS|THE_REQUEST "Gambling|Lexapro|Tramadol|Venlafaxine" "id:50012,msg:&#039;SPAM 12&#039;
SecFilterSelective ARGS|THE_REQUEST "\[URL=|abgood|acura|acyclovir|adderall" "id:50013,msg:&#039;SPAM 13&#039;
SecFilterSelective ARGS|THE_REQUEST "adipex|alcohol|alprazolam|amateur|amrit" "id:50014,msg:&#039;SPAM 14&#039;
SecFilterSelective ARGS|THE_REQUEST "anal sex|analfinder|angelina jolie|asshole|axspace\.com" "id:50015,msg:&#039;SPAM 15&#039;
SecFilterSelective ARGS|THE_REQUEST "baccarat|bankrupt|bikini|biotic|black jack|blowjob" "id:50016,msg:&#039;SPAM 16&#039;
SecFilterSelective ARGS|THE_REQUEST "blackjack|blog\.360|brutality|buddhism|butalbital" "id:50017,msg:&#039;SPAM 17&#039;
SecFilterSelective ARGS|THE_REQUEST "cadillac|canalis|card credit|card stud|carisoprodol" "id:50018,msg:&#039;SPAM 18&#039;
SecFilterSelective ARGS|THE_REQUEST "carmen|cash advance|cash credit|casino|catch\.com" "id:50019,msg:&#039;SPAM 19&#039;
SecFilterSelective ARGS|THE_REQUEST "celebrex|celexa|cellulite|cheap|cheerleader" "id:50020,msg:&#039;SPAM 20&#039;
SecFilterSelective ARGS|THE_REQUEST "chevrolet|child abuse|cialis|cigarette|cipro" "id:50021,msg:&#039;SPAM 21&#039;
SecFilterSelective ARGS|THE_REQUEST "citroen|claritin|cleavage|clomid|codeine" "id:50022,msg:&#039;SPAM 22&#039;
SecFilterSelective ARGS|THE_REQUEST "consulting23|craps online|credit card|credit debt|crestor" "id:50023,msg:&#039;SPAM 23&#039;
SecFilterSelective ARGS|THE_REQUEST "dealership|debt free|desnudas|diazepam|dick" "id:50024,msg:&#039;SPAM 24&#039;
SecFilterSelective ARGS|THE_REQUEST "dildo|drugstore|earrings|endometrioma|endowment" "id:50025,msg:&#039;SPAM 25&#039;
SecFilterSelective ARGS|THE_REQUEST "erotic|estrogen|fioricet|francaise|freehost\.com" "id:50026,msg:&#039;SPAM 26&#039;
SecFilterSelective ARGS|THE_REQUEST "freehostia|freemb\.com|fuck|geocities\.com|hacking myspace" "id:50027,msg:&#039;SPAM 27&#039;
SecFilterSelective ARGS|THE_REQUEST "holdem|honda|hotels|hydrocodone|hypnotic" "id:50028,msg:&#039;SPAM 28&#039;
SecFilterSelective ARGS|THE_REQUEST "hyundai|implants|incest|instant approval|insurance" "id:50029,msg:&#039;SPAM 29&#039;
SecFilterSelective ARGS|THE_REQUEST "interracial|jaguar|jenny movie|johanson|kasino" "id:50030,msg:&#039;SPAM 30&#039;
SecFilterSelective ARGS|THE_REQUEST "lesbian|levitra|lipitor|loan|lolita" "id:50031,msg:&#039;SPAM 31&#039;
SecFilterSelective ARGS|THE_REQUEST "lorazepam|lorcet|lyrics|madamic|majorette" "id:50032,msg:&#039;SPAM 32&#039;
SecFilterSelective ARGS|THE_REQUEST "malaria|mastercar|masturbate|masturbation|maturewomen" "id:50033,msg:&#039;SPAM 33&#039;
SecFilterSelective ARGS|THE_REQUEST "mazda|medication|medicine|megsfree5\.com|mercedes" "id:50034,msg:&#039;SPAM 34&#039;
SecFilterSelective ARGS|THE_REQUEST "meridia|metformin|mitsubishi|mortgage|myspace profile" "id:50035,msg:&#039;SPAM 35&#039;
SecFilterSelective ARGS|THE_REQUEST "naked|neocool|nexium|nimire\.com|nissan" "id:50036,msg:&#039;SPAM 36&#039;
SecFilterSelective ARGS|THE_REQUEST "nokia|nude|nudism|nymph|open toe" "id:50037,msg:&#039;SPAM 37&#039;
SecFilterSelective ARGS|THE_REQUEST "oprodol|orgasm|oxycodone|oxycontin|packages" "id:50038,msg:&#039;SPAM 38&#039;
SecFilterSelective ARGS|THE_REQUEST "painrelief|pantyhose|paxil|payday|penis" "id:50039,msg:&#039;SPAM 39&#039;
SecFilterSelective ARGS|THE_REQUEST "percocet|pharmacy|phentermine|phetermine|phpbb_root" "id:50040,msg:&#039;SPAM 40&#039;
SecFilterSelective ARGS|THE_REQUEST "pictaboo|pictorial|pills|pissing|play craps" "id:50041,msg:&#039;SPAM 41&#039;
SecFilterSelective ARGS|THE_REQUEST "playgirl|pocker web|poker|pontiac|poquer" "id:50042,msg:&#039;SPAM 42&#039;
SecFilterSelective ARGS|THE_REQUEST "porn|pounder|prescription|preteen|prevacid" "id:50043,msg:&#039;SPAM 43&#039;
SecFilterSelective ARGS|THE_REQUEST "price1|prilosec|propecia|proza|prozac" "id:50044,msg:&#039;SPAM 44&#039;
SecFilterSelective ARGS|THE_REQUEST "puddled|pussy|refinance|rentals|replica" "id:50045,msg:&#039;SPAM 45&#039;
SecFilterSelective ARGS|THE_REQUEST "ringtones|roulette|screensaver|seduced|sexual" "id:50046,msg:&#039;SPAM 46&#039;
SecFilterSelective ARGS|THE_REQUEST "sexy|shemale|shiloh|singulair|site-host" "id:50047,msg:&#039;SPAM 47&#039;
SecFilterSelective ARGS|THE_REQUEST "slot machine|slot maschine|slots machine|solpip\.com|soma" "id:50048,msg:&#039;SPAM 48&#039;
SecFilterSelective ARGS|THE_REQUEST "sperm|starlets|supplier|suzuki|tadalafil" "id:50049,msg:&#039;SPAM 49&#039;
SecFilterSelective ARGS|THE_REQUEST "toyota|tylenol|ultram|valium|viagra" "id:50050,msg:&#039;SPAM 50&#039;
SecFilterSelective ARGS|THE_REQUEST "vigora|vioxx|wallpaper|warez|webcam" "id:50051,msg:&#039;SPAM 51&#039;
SecFilterSelective ARGS|THE_REQUEST "webpages\.com|wellbutrin|whitesluts|wholesale|whore" "id:50052,msg:&#039;SPAM 52&#039;
SecFilterSelective ARGS|THE_REQUEST "windshield|xanax|xenical|y lohan|yourgirls" "id:50053,msg:&#039;SPAM 53&#039;
SecFilterSelective ARGS|THE_REQUEST "youtube\.com|zantac|sex offenders|hotgay|Zoloft|celtic women" "id:50054,msg:&#039;SPAM 54&#039;
SecFilterSelective ARGS|THE_REQUEST "dollhouse|freehot|kardashian|oralsex" "id:50055,msg:&#039;SPAM 55&#039;
SecFilterSelective ARGS|THE_REQUEST "freeimghost" "id:50056,msg:&#039;SPAM 56&#039;</pre>





<h2>Unreleased AskApache Lightning code - caching plugin for WordPress</h2>
<pre>RewriteEngine On
RewriteBase /
&nbsp;
RewriteCond %{REQUEST_URI} ^/(stats/|missing\.html|failed_auth\.html|test/).* [NC,OR]
RewriteCond %{ENV:REDIRECT_STATUS} =200
RewriteRule .* - [L]
&nbsp;
RewriteCond %{HTTP_HOST} !=www.askapache.com
RewriteCond %{HTTP_HOST} !=z.askapache.com
RewriteRule .? http://www.askapache.com%{REQUEST_URI}%{QUERY_STRING} [R=301,L]
&nbsp;
#RewriteCond %{HTTPS} =on
#RewriteCond %{THE_REQUEST} !^[A-Z]{3,9}\ /(wp-login.php|wp-admin)(.*)\ HTTP/ [NC]
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)\ HTTP/ [NC]
#RewriteRule .* http://www.askapache.com/$1 [R=301,L]
&nbsp;
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.+)%20(.+)\ HTTP/ [NC]
RewriteRule .* http://www.askapache.com/%1-%2 [R=301,L]
&nbsp;
RewriteCond %{THE_REQUEST} ^GET\ /valid-html/.*\ HTTP/ [NC]
RewriteCond %{HTTP_REFERER} ^https?://www.askapache.com(.+).*$ [NC]
RewriteRule .* http://validator.w3.org/check?uri=http://www.askapache.com%1;ss=1;outline=1;debug [R=307,L,NE]
&nbsp;
RewriteCond %{THE_REQUEST} ^GET\ /valid-css/.*\ HTTP/ [NC]
RewriteRule .* http://jigsaw.w3.org/css-validator/validator?uri=z.askapache.com/z/c/apache-10.css [R=301,L]
&nbsp;
RewriteCond %{THE_REQUEST} ^GET\ /search/.*\ HTTP/ [NC]
RewriteCond %{QUERY_STRING} ^s=(.+)$ [NC]
RewriteRule .* http://www.askapache.com/search/%1? [R=302,L]
&nbsp;
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/X%{REQUEST_URI}index.html -f
RewriteRule ^(.*)$ /X%{REQUEST_URI}index.html [L]
&nbsp;
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{DOCUMENT_ROOT}/X%{REQUEST_URI} -f
RewriteRule ^(.*)$ /X%{REQUEST_URI} [L]</pre>



<h2>Passing Parameters to CGI through HTTP Headers</h2>
<p>This deserves a note.. this trick lets you bypass so many hosting environment restrictions it's not even funny... like you can run bash as your webserver instead of apache!  (kinda...)</p>
<pre>RewriteCond %{REQUEST_URI} ^/cgi-bin/(hash|java)\.cgi$ [NC]
RewriteCond %{HTTP:P3P} ^(([^:]+):(.+))$ [NC]
RewriteRule .* - [E=HTTP_JS:%{HTTP:P3P},E=HTTP_US:%2,E=HTTP_PA:%3]</pre>



<h2>Redirect to FeedBurner</h2>
<p>Yes.. I was the first to do this (parse the real rewrites internally in wordpress for no bypassing possibilities)... </p>
<pre>#RewriteCond %{REQUEST_URI} ^/feed/.*?$ [NC,OR]
#RewriteCond %{HTTP_REFERER} ^https?://www.askapache.com/wp-admin(.+).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} FeedBurner [NC]
RewriteRule .* - [S=1]
&nbsp;
RewriteCond %{REQUEST_URI} ^/(feed|rdf|rss|rss2|atom).* [NC,OR]
RewriteCond %{REQUEST_URI} ^/wp-(feed|rdf|rss|rss2|atom).* [NC,OR]
RewriteCond %{REQUEST_FILENAME} ^.*/(wp-atom|wp-feed|wp-rdf|wp-rss|wp-rss2)\.php$ [NC,OR]
RewriteCond %{REQUEST_FILENAME} ^.*/wp-includes/feed[^\.]*\.php$ [NC,OR]
RewriteCond %{QUERY_STRING} .*(feed|rdf|rss|rss2|atom).* [NC]
RewriteRule .* http://feeds.askapache.com/apache/htaccess? [R=302,L]</pre>
































<h2>More Unreleased Caching Tests</h2>
<pre># +ASKAPACHE CRAZYCACHE 2.3
#######################################################
#               __                          __
#   ____ ______/ /______ _____  ____ ______/ /_  ___
#  / __ `/ ___/ //_/ __ `/ __ \/ __ `/ ___/ __ \/ _ \
# / /_/ (__  ) ,&lt; / /_/ / /_/ / /_/ / /__/ / / /  __/
# \__,_/____/_/|_|\__,_/ .___/\__,_/\___/_/ /_/\___/
#                     /_/
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
# +ACACHE RULES
# +RULE
RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ //?(.+)\.rdf\ HTTP/ [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-cache/%2.html/index.rdf -f
RewriteRule ^(.+)\.rdf$ /wp-cache/%2.html/index.rdf [L,S=3]
&nbsp;
RewriteCond %{QUERY_STRING} !^.*cacheit.* [NC]
#RewriteCond %{HTTP_USER_AGENT} W3C_Validator [OR,NC]
#RewriteCond %{REMOTE_ADDR} = [OR]
&nbsp;
RewriteCond %{REQUEST_METHOD} =POST [OR]
RewriteCond %{THE_REQUEST} ^$ [OR]
RewriteCond %{QUERY_STRING} nocache [OR]
RewriteCond %{REMOTE_ADDR} = [OR]
RewriteCond %{HTTP_COOKIE} ^.*wordpress_logged_in_.*$ [NC]
RewriteRule .+ - [S=2]
&nbsp;
RewriteCond %{DOCUMENT_ROOT}/wp-cache%{REQUEST_URI} !-d
RewriteRule .+ - [S=1]
&nbsp;
RewriteCond %{DOCUMENT_ROOT}/wp-cache%{REQUEST_URI}/index.html -f
RewriteRule .+ /wp-cache%{REQUEST_URI}/index.html [L]
# -RULE
# -ACACHE RULES
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
#               __                          __
#   ____ ______/ /______ _____  ____ ______/ /_  ___
#  / __ `/ ___/ //_/ __ `/ __ \/ __ `/ ___/ __ \/ _ \
# / /_/ (__  ) ,&lt; / /_/ / /_/ / /_/ / /__/ / / /  __/
# \__,_/____/_/|_|\__,_/ .___/\__,_/\___/_/ /_/\___/
#                     /_/
#######################################################
# -ASKAPACHE CRAZYCACHE 2.3
&nbsp;
# +ASKAPACHE CRAZYCACHE 2.3
#######################################################
#               __                          __
#   ____ ______/ /______ _____  ____ ______/ /_  ___
#  / __ `/ ___/ //_/ __ `/ __ \/ __ `/ ___/ __ \/ _ \
# / /_/ (__  ) ,&lt; / /_/ / /_/ / /_/ / /__/ / / /  __/
# \__,_/____/_/|_|\__,_/ .___/\__,_/\___/_/ /_/\___/
#                     /_/
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
# +ACACHE RULES
# +RULE
FileETag None
AddOutputFilterByType DEFLATE text/html
&nbsp;
AddType &#039;text/html; charset=UTF-8&#039; .html
&nbsp;
Header set P3P "policyref=\"http://www.askapache.com/w3c/p3p.xml\""
Header set X-Pingback "http://www.askapache.com/xmlrpc.php"
Header set Content-Language "en-US"
Header set Vary "Accept-Encoding,Accept"
&nbsp;
&lt;ifModule mod_expires.c&gt;
ExpiresActive On
ExpiresDefault M7200
&lt;/ifModule&gt;
# -RULE
# -ACACHE RULES
# - - - - - - - - - - - - - - - - - - - - - - - - - - -
#               __                          __
#   ____ ______/ /______ _____  ____ ______/ /_  ___
#  / __ `/ ___/ //_/ __ `/ __ \/ __ `/ ___/ __ \/ _ \
# / /_/ (__  ) ,&lt; / /_/ / /_/ / /_/ / /__/ / / /  __/
# \__,_/____/_/|_|\__,_/ .___/\__,_/\___/_/ /_/\___/
#                     /_/
#######################################################
# -ASKAPACHE CRAZYCACHE 2.3
&nbsp;
Options +IndexesOptions +FollowSymLinks
AddHandler application/x-httpd-php .php
&nbsp;
RewriteEngine On
RewriteBase /
RewriteCond %{QUERY_STRING} !^tyy+$ [NC]
RewriteCond %{REMOTE_USER} ^(.+)$
RewriteRule ^(.*)$ $1/-%1 [R=302,L]
Options +FollowSymLinks
DirectoryIndex index.php
ErrorDocument 404 /cgi-bin/pro/index.php
&nbsp;
AuthName "Protection"
AuthUserFile /home/askapache/sites/askapache.com/.htpasswda1
AuthGroupFile /dev/null
AuthType Basic
Require valid-user
Satisfy Any
&nbsp;
&lt;ifModule mod_security.c&gt;
SecFilterEngine Off
&lt;/ifModule&gt;
Options +ExecCGI -Indexes -Includes +FollowSymLinks
Order Deny,Allow
Deny from All
Allow from 208.113.134.190 64.111.114.111  env=REDIRECT_STATUS
&nbsp;
#SetEnvIf Remote_Addr ^$ MODSEC_ENABLE=Off
#SetEnvIf Server_Addr ^$ MODSEC_ENABLE=Off
#SetEnvIf Remote_Addr ^({SERVER_ADDR}e)$ GOOD=$1
#SetEnvIf Server_Addr GOOD R</pre>


<h2>Default HTACCESS</h2>
<pre>#
# Directives controlling the display of server-generated directory listings.
#
# Required modules: mod_autoindex, mod_alias
#
# To see the listing of a directory, the Options directive for the
# directory must include "Indexes", and the directory must not contain
# a file matching those listed in the DirectoryIndex directive.
#
Options +Indexes +MultiViews -ExecCGI +FollowSymLinks
DirectoryIndex index.html
&nbsp;
#
#
# IndexOptions: Controls the appearance of server-generated directory
# listings.
#
IndexOptions FancyIndexing IconHeight=22 IconWidth=20 IgnoreClient NameWidth=* DescriptionWidth=* ScanHTMLTitles SuppressLastModified XHTML FoldersFirst SuppressHTMLPreamble
&nbsp;
#
# AddIcon* directives tell the server which icon to show for different
# files or filename extensions.  These are only displayed for
# FancyIndexed directories.
#
&nbsp;
AddIconByEncoding (CMP,http://z.askapache.com/i/s/compressed.gif) x-compress x-gzip
&nbsp;
AddIconByType (IMG,http://z.askapache.com/i/s/image.gif) image/*
AddIconByType (SND,http://z.askapache.com/i/s/sound2.gif) audio/*
AddIconByType (TXT,http://z.askapache.com/i/s/text.gif) text/*
AddIconByType (VID,http://z.askapache.com/i/s/movie.gif) video/*
&nbsp;
AddIcon http://z.askapache.com/i/s/hand.right.gif README
AddIcon http://z.askapache.com/i/s/folder.gif ^^DIRECTORY^^
AddIcon http://z.askapache.com/i/s/dir.png ^^DIRECTORY^^
AddIcon http://z.askapache.com/i/s/blank.gif ^^BLANKICON^^
AddDescription "100 Continue" 100* 100/index.html
AddDescription "101 Switching Protocols" 101* 101/index.html
AddDescription "102 Processing" 102* 102/index.html
AddDescription "200 OK" 200* 200/index.html
AddDescription "201 Created" 201* 201/index.html
AddDescription "202 Accepted" 202* 202/index.html
AddDescription "203 Non-Authoritative Information" 203* 203/index.html
AddDescription "204 No Content" 204* 204/index.html
AddDescription "205 Reset Content" 205* 205/index.html
AddDescription "206 Partial Content" 206* 206/index.html
AddDescription "207 Multi-Status" 207* 207/index.html
AddDescription "300 Multiple Choices" 300* 300/index.html
AddDescription "301 Moved Permanently" 301* 301/index.html
AddDescription "302 Found" 302* 302/index.html
AddDescription "303 See Other" 303* 303/index.html
AddDescription "304 Not Modified" 304* 304/index.html
AddDescription "305 Use Proxy" 305* 305/index.html
AddDescription "306 unused" 306* 306/index.html
AddDescription "307 Temporary Redirect" 307* 307/index.html
AddDescription "400 Bad Request" 400* 400/index.html
AddDescription "401 Authorization Required" 401* 401/index.html
AddDescription "402 Payment Required" 402* 402/index.html
AddDescription "403 Forbidden" 403* 403/index.html
AddDescription "404 Not Found" 404* 404/index.html
AddDescription "405 Method Not Allowed" 405* 405/index.html
AddDescription "406 Not Acceptable" 406* 406/index.html
AddDescription "407 Proxy Authentication Required" 407* 407/index.html
AddDescription "408 Request Time-out" 408* 408/index.html
AddDescription "409 Conflict" 409* 409/index.html
AddDescription "410 Gone" 410* 410/index.html
AddDescription "411 Length Required" 411* 411/index.html
AddDescription "412 Precondition Failed" 412* 412/index.html
AddDescription "413 Request Entity Too Large" 413* 413/index.html
AddDescription "414 Request-URI Too Large" 414* 414/index.html
AddDescription "415 Unsupported Media Type" 415* 415/index.html
AddDescription "416 Requested Range Not Satisfiable" 416* 416/index.html
AddDescription "417 Expectation Failed" 417* 417/index.html
AddDescription "418 unused" 418* 418/index.html
AddDescription "419 unused" 419* 419/index.html
AddDescription "420 unused" 420* 420/index.html
AddDescription "421 unused" 421* 421/index.html
AddDescription "422 Unprocessable Entity" 422* 422/index.html
AddDescription "423 Locked" 423* 423/index.html
AddDescription "424 Failed Dependency" 424* 424/index.html
AddDescription "425 No code" 425* 425/index.html
AddDescription "426 Upgrade Required" 426* 426/index.html
AddDescription "500 Internal Server Error" 500* 500/index.html
AddDescription "501 Method Not Implemented" 501* 501/index.html
AddDescription "502 Bad Gateway" 502* 502/index.html
AddDescription "503 Service Temporarily Unavailable" 503* 503/index.html
AddDescription "504 Gateway Time-out" 504* 504/index.html
AddDescription "505 HTTP Version Not Supported" 505* 505/index.html
AddDescription "506 Variant Also Negotiates" 506* 506/index.html
AddDescription "507 Insufficient Storage" 507* 507/index.html
AddDescription "508 unused" 508* 508/index.html
AddDescription "509 unused" 509* 509/index.html
AddDescription "510 Not Extended" 510* 510/index.html
AddDescription ".htaccess ErrorDocuments" *
&nbsp;
#
# HeaderName is the name of a file which should be prepended to
# directory indexes.
ReadmeName /X/error/README.html
HeaderName /X/error/HEADER.html
&nbsp;
# DefaultIcon is which icon to show for where none is explicitly set.
DefaultIcon http://z.askapache.com/i/s/generic.gif</pre>


<h2>Ok I'm done commenting..</h2>
<pre>#
# IndexIgnore is a set of filenames which directory indexing should ignore
# and not include in the listing.  Shell-style wildcarding is permitted.
#
IndexIgnore .??*  *_notes *~
RewriteEngine On
RewriteCond %{HTTPS} !=on [NC]
RewriteRule .* https://www.askapache.com%{REQUEST_URI}
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},E=REMOTE_USER:%{HTTP:Authorization}]
&nbsp;
#RewriteCond %{QUERY_STRING} openid.mode=authorize
#RewriteCond %{REQUEST_URI} ^/openid.*$ [NC]
#RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization},E=REMOTE_USER:%{HTTP:Authorization}]
Options +FollowSymLinks
DirectoryIndex index.html
&nbsp;
#SetEnvIfNoCase ^Cookie$ "(.*)" HTTP_MY_COOKIE=$1
#SetEnvIfNoCase Remote_Addr "(.*)" HTTP_MY_REMOTE_ADDR=$1
ExpiresActive Off
FileETag None
Header unset Connection
Header set Connection "close"
Header unset Last-Modified
Header unset ETag
Header unset Accept-Ranges
Header unset Vary
Header unset Content-Type
Header unset X-Pingback
Header unset P3P
#Header add RouterBits "%D %t"
#Header add Location "http://www.askapache.com/feed/"
#Header add Found "http://askapache.com/feed/"
#Header add Content-Location "http://www.askapache.com/feed/"
#Header add Refresh "http://www.askapache.com/feed/"
#Header set Hi "%{HTTP_MY_REMOTE_ADDR}e"
### Section 1: Global Environment
#
# The directives in this section affect the overall operation of Apache,
# such as the number of concurrent requests it can handle or where it
# can find its configuration files.
#
#
# TZ: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
SetEnv TZ America/Indianapolis
&nbsp;
#
# ServerAdmin: Your address, where problems with the server should be
# e-mailed.  This address appears on some server-generated pages, such
# as error documents.  e.g. admin@your-domain.com
#
SetEnv SERVER_ADMIN webmaster@askapache.com
&nbsp;
#
# Possible values for the Options directive are "None", "All",
# or any combination of:
#   Indexes Includes FollowSymLinks SymLinksifOwnerMatch ExecCGI MultiViews
#
# The Options directive is both complicated and important.  Please see
# http://httpd.apache.org/docs/2.0/mod/core.html#options
# for more information.
#
Options  +FollowSymLinks -ExecCGI -Indexes -Includes -MultiViews
&nbsp;
#
# DirectoryIndex: sets the file that Apache will serve if a directory
# is requested.
#
DirectoryIndex index.html index.php /index.php
&nbsp;
#
# The following lines prevent .htaccess and .htpasswd files from being
# viewed by Web clients.
#
&lt;filesMatch "^\.ht"&gt;
    Order allow,deny
    Deny from all
  Satisfy All
&lt;/filesMatch&gt;
&nbsp;
#
# DefaultType: the default MIME type the server will use for a document
# if it cannot otherwise determine one, such as from filename extensions.
# If your server contains mostly text or HTML documents, "text/plain" is
# a good value.  If most of your content is binary, such as applications
# or images, you may want to use "application/octet-stream" instead to
# keep browsers from trying to display binary files as though they are
# text.
#
DefaultType text/html
&nbsp;
#
# Optionally add a line containing the server version and virtual host
# name to server-generated pages (internal error documents, FTP directory
# listings, mod_status and mod_info output etc., but not CGI generated
# documents or custom error documents).
# Set to "EMail" to also include a mailto: link to the ServerAdmin.
# Set to one of:  On | Off | EMail
#
ServerSignature Off
&nbsp;
##############################################
#           HEADERS and CACHING              #
##############################################
Header unset Pragma
Header unset Last-Modified
FileETag None
&nbsp;
Redirect 400 /e/400
Redirect 401 /e/401
Redirect 402 /e/402
Redirect 403 /e/403
Redirect 404 /e/404
Redirect 405 /e/405
Redirect 406 /e/406
Redirect 407 /e/407
Redirect 408 /e/408
Redirect 409 /e/409
Redirect 410 /e/410
Redirect 411 /e/411
Redirect 412 /e/412
Redirect 413 /e/413
Redirect 414 /e/414
Redirect 415 /e/415
Redirect 416 /e/416
Redirect 417 /e/417
Redirect 418 /e/418
Redirect 419 /e/419
Redirect 420 /e/420
Redirect 421 /e/421
Redirect 422 /e/422
Redirect 423 /e/423
Redirect 424 /e/424
Redirect 425 /e/425
Redirect 426 /e/426
Redirect 500 /e/500
Redirect 501 /e/501
Redirect 502 /e/502
Redirect 503 /e/503
Redirect 504 /e/504
Redirect 505 /e/505
Redirect 506 /e/506
Redirect 507 /e/507
Redirect 508 /e/508
Redirect 509 /e/509
Redirect 510 /e/510
&nbsp;
#
# Redirect allows you to tell clients about documents which used to exist in
# your server&#039;s namespace, but do not anymore. This allows you to tell the
# clients where to look for the relocated document.
##############################################
#          PERMANENT REDIRECTS               #
##############################################
Redirect 301 /12-lessons-for-those-afraid-of-css.html http://www.askapache.com/css/12-lessons-for-those-afraid-of-css.html
Redirect 301 /2006/htaccess/htaccesselite-ultimate-htaccess-article.html http://www.askapache.com/htaccess/apache-htaccess.html
Redirect 301 /2007/phpbb/sending-post-form-data-with-php-curl.html http://www.askapache.com/htaccess/sending-post-form-data-with-php-curl.html
Redirect 301 /2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html http://www.askapache.com/dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html
Redirect 301 /2007/webmaster/custom-phpini-with-fastcgi-on-dreamhost.html http://www.askapache.com/dreamhost/custom-phpini-with-fastcgi-on-dreamhost.html
Redirect 301 /2007/webmaster/php-and-ajax-shell-console.html http://www.askapache.com/tools/php-and-ajax-shell-console.html
Redirect 301 /27-request-methods-for-use-with-apache-and-rewritecond-and-htaccess.html http://www.askapache.com/htaccess/27-request-methods-for-use-with-apache-and-rewritecond-and-htaccess.html
Redirect 301 /404-google-wordpress-plugin.html http://www.askapache.com/seo/404-google-wordpress-plugin.html
Redirect 301 /503-service-temporarily-unavailable.html http://www.askapache.com/htaccess/503-service-temporarily-unavailable.html
Redirect 301 /Overview-about.rdf http://www.askapache.com/askapache-home.rdf
Redirect 301 /abbr-acronym.html http://www.askapache.com/xhtml/abbr-acronym.html
Redirect 301 /adsense-robots.html http://www.askapache.com/google/adsense-robots.html
Redirect 301 /alexa-toolbar-firefox.html http://www.askapache.com/tools/alexa-toolbar-firefox.html
Redirect 301 /allowing-access-from-1-static-ip-and-deny-the-rest.html http://www.askapache.com/htaccess/apache-htaccess.html
Redirect 301 /anti-virus-spyware-rootkit.html http://www.askapache.com/security/anti-virus-spyware-rootkit.html
Redirect 301 /apache-ssl-in-htaccess-examples.html http://www.askapache.com/htaccess/apache-ssl-in-htaccess-examples.html
Redirect 301 /awk-tutorial.html http://www.askapache.com/awk/awk-tutorial.html
Redirect 301 /best-adsense-optimization.html http://www.askapache.com/wordpress/best-adsense-optimization.html
Redirect 301 /commonly-used-htaccess-code-examples.html http://www.askapache.com/htaccess/commonly-used-htaccess-code-examples.html
Redirect 301 /css-background-image-sprite.html http://www.askapache.com/css/css-background-image-sprite.html
Redirect 301 /css-browser-screenshots.html http://www.askapache.com/tools/css-browser-screenshots.html
Redirect 301 /css-class-example.html http://www.askapache.com/css/css-class-example.html
Redirect 301 /curl-multi-downloads.html http://www.askapache.com/php/curl-multi-downloads.html
Redirect 301 /custom-boot-menu-in-windows-xp.html http://www.askapache.com/windows/custom-boot-menu-in-windows-xp.html
Redirect 301 /donate http://www.dreamhost.com/donate.cgi?id=8261
Redirect 301 /donate/ http://www.dreamhost.com/donate.cgi?id=8261
Redirect 301 /htaccess.txt http://z.askapache.com/p/htaccess.txt
Redirect 301 /htaccess/404-errorpages.html http://www.askapache.com/seo/google-ajax-search-seo-tips.html
Redirect 301 /htaccess/feedsmith http://www.askapache.com/htaccess/feedsmith-htaccess.html
Redirect 301 /htaccess/http-status-codes.html http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html
Redirect 301 /htaccess/instruct-search-engines-to-come-back-to-site-after-you-finish-working-on-it.html http://www.askapache.com/htaccess/503-service-temporarily-unavailable.html
Redirect 301 /htaccess/speed-up-the-apache-web-server-with-configuration-hacks.html http://www.askapache.com/htaccess/apache-web-server-speed-configuration-hacks.html
Redirect 301 /instruct-search-engines-to-come-back-to-site-after-you-finish-working-on-it.html http://www.askapache.com/htaccess/503-service-temporarily-unavailable.html
Redirect 301 /security/bypassing-vlan.html http://www.askapache.com/security/hacking-vlan-switched-networks.html
Redirect 301 /security/bypassing-vlanbypassing-vlan.html http://www.askapache.com/security/hacking-vlan-switched-networks.html
Redirect 301 /security/rigging-the-dreamhost-site-of-the-month-contest.html http://www.askapache.com/dreamhost/rigging-the-dreamhost-site-of-the-month-contest.html
Redirect 301 /seo/tailrankcom-robot.html http://www.askapache.com/seo/tailrank-robot.html
Redirect 301 /webmaster/caching-tutorial-for-webmasters.html http://www.askapache.com/htaccess/caching-tutorial-for-webmasters.html
Redirect 301 /webmaster/lft-traceroute-tool.html http://www.askapache.com/tools/lft-traceroute-tool.html
&nbsp;
##############################################
#          PERMANENT REDIRECTMATCH           #
##############################################
#RedirectMatch 301 ^/&amp;(.*)$ http://www.askapache.com/
RedirectMatch 301 ^/&amp;amp(.*)$ http://www.askapache.com/
RedirectMatch 301 ^/([^/]+)//$ http://www.askapache.com/$1/
RedirectMatch 301 ^/(.+)/htaccesselite-ultimate-htaccess-article.html(.*) http://www.askapache.com/htaccess/apache-htaccess.html
RedirectMatch 301 ^/(.+)\.html/([a-z][a-z])/$ http://www.askapache.com/$1.html
RedirectMatch 301 ^/([\(]+)(.*)$ http://www.askapache.com/
RedirectMatch 301 ^/([^9]*)9O1X.3y(.*)/(.*)$ http://www.askapache.com/$2
RedirectMatch 301 ^/.3y(.*)$ http://www.askapache.com/
RedirectMatch 301 ^/200([0-9])/([0-9])(.*)$ http://www.askapache.com/top-100/
RedirectMatch 301 ^/200([0-9])/([^01])(.*)$ http://www.askapache.com/$2$3
RedirectMatch 301 ^/about/glossary(.*)$ http://www.askapache.com/glossary$1
RedirectMatch 301 ^/apache-speed(.*)$ http://www.askapache.com/htaccess/apache-speed$1
RedirectMatch 301 ^/category/(.+)$ http://www.askapache.com/$1
RedirectMatch 301 ^/docs/(.*)$ http://askapache.info/$1
RedirectMatch 301 ^/htaccess/feedsmith-htaccess(.*) http://www.askapache.com/htaccess/redirecting-wordpress-feeds-to-feedburner.html
RedirectMatch 301 ^/robots-txt(.*)$ http://www.askapache.com/robots.txt
#RedirectMatch 301 ^/wp-content/uploads/(.*)$ http://z.askapache.com/uploads/$1
RedirectMatch 301 ^/z/(.+)$ http://z.askapache.com/$1
RedirectMatch 301 ^/(z|t|i|j|c|p)/(.*)$ http://z.askapache.com/$1/$2
RedirectMatch 301 ^/hosting/?$ http://www.askapache.com/hosting/
&nbsp;
##############################################
#          TEMPORARY REDIRECTMATCH           #
##############################################
RedirectMatch 307 ^/getflash/?$ http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash
RedirectMatch 307 ^/dream/?$ http://www.askapache.com/dreamhost/
RedirectMatch 307 ^/(cse|apachecse|apachecsetest|apachesearch)/?$ http://www.google.com/coop/cse?cx=002660089121042511758%3Akk7rwc2gx0i
&nbsp;
#
# Commonly used filename extensions to character sets. You probably
# want to avoid clashes with the language extensions, unless you
# are good at carefully testing your setup after each change.
# See http://www.iana.org/assignments/character-sets for the
# official list of charset names and their respective RFCs.
#
AddDefaultCharset UTF-8
&nbsp;
#
# AddType allows you to add to or override the MIME configuration
# file mime.types for specific file types.
#
#
AddType &#039;application/rdf+xml; charset=UTF-8&#039; .rdf
AddType &#039;application/xhtml+xml; charset=UTF-8&#039; .xhtml
AddType &#039;application/xhtml+xml; charset=UTF-8&#039; .xhtml.gz
AddType &#039;text/html; charset=UTF-8&#039; .html
AddType &#039;text/html; charset=UTF-8&#039; .html.gz
AddType application/octet-stream .rar .chm .bz2 .tgz .msi .pdf .exe
AddType application/vnd.ms-excel .csv
AddType application/x-httpd-php-source .phps
AddType application/x-pilot .prc .pdb
AddType application/x-shockwave-flash .swf
AddType application/xrds+xml .xrdf
AddType text/plain .ini .sh .bsh .bash .awk .nawk .gawk .csh .var .c .in .h .asc .md5 .sha .sha1
AddType video/x-flv .flv
&nbsp;
#
# AddEncoding allows you to have certain browsers uncompress
# information on the fly. Note: Not all browsers support this.
# Despite the name similarity, the following Add* directives have nothing
# to do with the FancyIndexing customization directives above.
#
AddEncoding x-compress .Z
AddEncoding x-gzip .gz .tgz
&nbsp;
#
# AddHandler allows you to map certain file extensions to "handlers":
# actions unrelated to filetype. These can be either built into the server
# or added with the Action directive (see below)
#
# To use CGI scripts outside of ScriptAliased directories:
# (You will also need to add "ExecCGI" to the "Options" directive.)
#
AddHandler php-cgi .php
&nbsp;
#
# Action lets you define media types that will execute a script whenever
# a matching file is called. This eliminates the need for repeated URL
# pathnames for oft-used CGI file processors.
# Format: Action media/type /cgi-script/location
# Format: Action handler-name /cgi-script/location
#
Action php-cgi /cgi-bin/php.cgi
&nbsp;
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
#100 Continue
#101 Switching Protocols
#102 Processing
#200 OK
#201 Created
#202 Accepted
#203 Non-Authoritative Information
#204 No Content
#205 Reset Content
#206 Partial Content
#207 Multi-Status
#300 Multiple Choices
#301 Moved Permanently
#302 Found
#303 See Other
#304 Not Modified
#305 Use Proxy
#306 unused
#307 Temporary Redirect
#400 Bad Request
#401 Authorization Required
#402 Payment Required
#403 Forbidden
#404 Not Found
#405 Method Not Allowed
#406 Not Acceptable
#407 Proxy Authentication Required
#408 Request Time-out
#409 Conflict
#410 Gone
#411 Length Required
#412 Precondition Failed
#413 Request Entity Too Large
#414 Request-URI Too Large
#415 Unsupported Media Type
#416 Requested Range Not Satisfiable
#417 Expectation Failed
#418 unused
#419 unused
#420 unused
#421 unused
#422 Unprocessable Entity
#423 Locked
#424 Failed Dependency
#425 No code
#426 Upgrade Required
#500 Internal Server Error
#501 Method Not Implemented
#502 Bad Gateway
#503 Service Temporarily Unavailable
#504 Gateway Time-out
#505 HTTP Version Not Supported
#506 Variant Also Negotiates
#507 Insufficient Storage
#508 unused
#509 unused
#510 Not Extended
&nbsp;
#ErrorDocument 100 /X/err/1/HTTP_CONTINUE.html
#ErrorDocument 101 /X/err/1/HTTP_SWITCHING_PROTOCOLS.html
#ErrorDocument 102 /X/err/1/HTTP_PROCESSING.html
&nbsp;
#ErrorDocument 200 /X/err/2/HTTP_OK.html
#ErrorDocument 201 /X/err/2/HTTP_CREATED.html
#ErrorDocument 202 /X/err/2/HTTP_ACCEPTED.html
#ErrorDocument 203 /X/err/2/HTTP_NON_AUTHORITATIVE.html
#ErrorDocument 204 /X/err/2/HTTP_NO_CONTENT.html
#ErrorDocument 205 /X/err/2/HTTP_RESET_CONTENT.html
#ErrorDocument 206 /X/err/2/HTTP_PARTIAL_CONTENT.html
#ErrorDocument 207 /X/err/2/HTTP_MULTI_STATUS.html
&nbsp;
#ErrorDocument 300 /X/err/HTTP_MULTIPLE_CHOICES.html
#ErrorDocument 301 /X/err/HTTP_MOVED_PERMANENTLY.html
#ErrorDocument 302 /X/err/HTTP_MOVED_TEMPORARILY.html
#ErrorDocument 303 /X/err/HTTP_SEE_OTHER.html
#ErrorDocument 304 /X/err/HTTP_NOT_MODIFIED.html
#ErrorDocument 305 /X/err/HTTP_USE_PROXY.html
#ErrorDocument 307 /X/err/HTTP_TEMPORARY_REDIRECT.html
#ErrorDocument 404 /X/err/HTTP_NOT_FOUND.html
&nbsp;
ErrorDocument 400 /X/err/4/HTTP_BAD_REQUEST.html
ErrorDocument 401 /X/err/4/HTTP_UNAUTHORIZED.html
ErrorDocument 402 /X/err/4/HTTP_PAYMENT_REQUIRED.html
ErrorDocument 403 /X/err/4/HTTP_FORBIDDEN.html
ErrorDocument 405 /X/err/4/HTTP_METHOD_NOT_ALLOWED.html
ErrorDocument 406 /X/err/4/HTTP_NOT_ACCEPTABLE.html
ErrorDocument 407 /X/err/4/HTTP_PROXY_AUTHENTICATION_REQUIRED.html
ErrorDocument 408 /X/err/4/HTTP_REQUEST_TIME_OUT.html
ErrorDocument 409 /X/err/4/HTTP_CONFLICT.html
ErrorDocument 410 /X/err/4/HTTP_GONE.html
ErrorDocument 411 /X/err/4/HTTP_LENGTH_REQUIRED.html
ErrorDocument 412 /X/err/4/HTTP_PRECONDITION_FAILED.html
ErrorDocument 413 /X/err/4/HTTP_REQUEST_ENTITY_TOO_LARGE.html
ErrorDocument 414 /X/err/4/HTTP_REQUEST_URI_TOO_LARGE.html
ErrorDocument 415 /X/err/4/TTP_UNSUPPORTED_MEDIA_TYPE.html
ErrorDocument 416 /X/err/4/HTTP_RANGE_NOT_SATISFIABLE.html
ErrorDocument 417 /X/err/4/HTTP_EXPECTATION_FAILED.html
ErrorDocument 422 /X/err/4/HTTP_UNPROCESSABLE_ENTITY.html
ErrorDocument 423 /X/err/4/HTTP_LOCKED.html
ErrorDocument 424 /X/err/4/HTTP_FAILED_DEPENDENCY.html
ErrorDocument 426 /X/err/4/HTTP_UPGRADE_REQUIRED.html
&nbsp;
ErrorDocument 500 /X/err/5/HTTP_INTERNAL_SERVER_ERROR.html
ErrorDocument 501 /X/err/5/HTTP_NOT_IMPLEMENTED.html
ErrorDocument 502 /X/err/5/HTTP_BAD_GATEWAY.html
ErrorDocument 503 /X/err/5/HTTP_SERVICE_UNAVAILABLE.html
ErrorDocument 504 /X/err/5/HTTP_GATEWAY_TIME_OUT.html
ErrorDocument 505 /X/err/5/HTTP_VERSION_NOT_SUPPORTED.html
ErrorDocument 506 /X/err/5/HTTP_VARIANT_ALSO_VARIES.html
ErrorDocument 507 /X/err/5/HTTP_INSUFFICIENT_STORAGE.html
ErrorDocument 510 /X/err/5/HTTP_NOT_EXTENDED.html
ErrorDocument 404 /index.php?error=404
&nbsp;
# 1 YEAR
&lt;filesMatch "\.(ico|pdf|flv|jpg|jpeg|png|gif|swf)$"&gt;
Header unset P3P
Header set Cache-Control "public"
Header set Expires "Thu, 15 Apr 2010 20:00:00 GMT"
&lt;/filesMatch&gt;
&nbsp;
# 2 HOURS
&lt;filesMatch "\.(html|htm|xml|txt|xsl)$"&gt;
&lt;ifModule mod_expires.c&gt;
ExpiresActive On
ExpiresDefault A3600
&lt;/ifModule&gt;
&lt;/filesMatch&gt;
&nbsp;
RewriteEngine On
RewriteBase /
&nbsp;
RewriteCond %{ENV:REDIRECT_STATUS} =200
RewriteRule .* - [L]
&nbsp;
RewriteCond %{REQUEST_METHOD} !^(GET|HEAD) [OR]
#RewriteCond %{QUERY_STRING} !^$ [OR]
RewriteCond %{HTTP_COOKIE} ^.*(comment_author_|wordpress|wp-postpass_).*$ [NC]
RewriteRule ^(.*)$ - [S=6]
&nbsp;
RewriteCond %{HTTP_USER_AGENT} .*W3C_Validator.* [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/aa/$1/index.xhtml.gz -f
RewriteRule ^(.*)$ /wp-content/cache/aa/$1/index.xhtml.gz [L,S=5]
&nbsp;
RewriteCond %{HTTP:Accept} application/xhtml\+xml [NC]
RewriteCond %{HTTP:Accept-Encoding} gzip [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/aa/$1/index.xhtml.gz -f
RewriteRule ^(.*)$ /wp-content/cache/aa/$1/index.xhtml.gz [L,S=4]
&nbsp;
RewriteCond %{HTTP:Accept-Encoding} gzip [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/aa/$1/index.html.gz -f
RewriteRule ^(.*)$ /wp-content/cache/aa/$1/index.html.gz [L,S=3]
&nbsp;
RewriteCond %{HTTP_USER_AGENT} .*W3C_Validator.* [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/aa/$1/index.xhtml -f
RewriteRule ^(.*)$ /wp-content/cache/aa/$1/index.xhtml [L,S=2]
&nbsp;
RewriteCond %{HTTP:Accept} application/xhtml\+xml [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/aa/$1/index.xhtml -f
RewriteRule ^(.*)$ /wp-content/cache/aa/$1/index.xhtml [L,S=1]
&nbsp;
RewriteCond %{DOCUMENT_ROOT}/wp-content/cache/aa/$1/index.html -f
RewriteRule ^(.*)$ /wp-content/cache/aa/$1/index.html [L]
&nbsp;
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.+)\.rdf\ HTTP/ [NC]
RewriteCond %{DOCUMENT_ROOT}/wp-content/rdf/%1.html/index.rdf -f
RewriteRule ^(.*)$ /wp-content/rdf/%1.html/index.rdf [L,S=1]
&nbsp;
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(error|w3c|openid)(/?.*)\ HTTP/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ /X/%1%2 [L]
&nbsp;
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(y_key_bf61afd498f7623a\.html|google3bb7b7e1032ad0d4\.html|yadis\.xrdf|askapache-home\.rdf|os-description\.xml|labels\.rdf|gnu-fdl\.txt|wlmmanifest\.xml|robots\.txt)\ HTTP/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .* /X/%1 [L]
&nbsp;
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /X(.*)\ HTTP/ [NC]
RewriteRule .* - [F]
&nbsp;
RewriteRule ^osq?(.*)$ /wp-content/plugins/wp-opensearch.php?$1 [QSA,L]
&nbsp;
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /wp-login(.+)\ HTTP/ [NC]
#RewriteRule .+ https://www.askapache.com/wp-login%1 [R,L]
&nbsp;
RewriteCond %{REQUEST_URI} ^/cgi-bin/(hash|java)\.cgi$ [NC]
RewriteCond %{HTTP:P3P} ^(([^:]+):(.+))$ [NC]
RewriteRule .* - [E=HTTP_JS:%{HTTP:P3P},E=HTTP_US:%2,E=HTTP_PA:%3]
&nbsp;
RewriteCond %{HTTP_ACCEPT} application/xrds\+xml
RewriteCond %{HTTP_ACCEPT} !application/xrds\+xml\s*;\s*q\s*=\s*0(\.0{1,3})?\s*(,|$)
RewriteRule ^$ http://www.askapache.com/yadis.xrdf [R,L]
&nbsp;
RewriteCond %{HTTP_USER_AGENT} !^(FeedBurner|FeedValidator|talkr.com).* [NC]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(feed|rdf|rss|rss2|atom)/?.*\ HTTP/ [NC]
#RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(feed|rdf|rss|rss2|atom|wp-atom|wp-feed|wp-rdf|wp-rss|wp-rss2).*\ HTTP/ [NC]
RewriteRule .* http://feeds.askapache.com/apache/htaccess? [R=302,L]
&nbsp;
#RewriteCond %{REMOTE_ADDR} ^$
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule ^(.+)\.phps$ /cgi-bin/phps.php?file=$1.php [L,NC]</pre>

<p><a href="http://www.askapache.com/htaccess/real-world-htaccess-files.html"></a><a href="http://www.askapache.com/htaccess/real-world-htaccess-files.html">Actual Htaccess Files from My Server</a> originally appeared on <cite>AskApache.com</cite> </p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/real-world-htaccess-files.html/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

