<?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; CSS</title>
	<atom:link href="http://www.askapache.com/css/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.askapache.com</link>
	<description>Advanced Web Development</description>
	<lastBuildDate>Thu, 19 Nov 2009 12:21:49 +0000</lastBuildDate>
	
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Advanced WordPress wp-config.php Tweaks</title>
		<link>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html</link>
		<comments>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html#comments</comments>
		<pubDate>Sat, 03 Oct 2009 07:23:37 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Shell Scripting]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[admin]]></category>
		<category><![CDATA[advanced]]></category>
		<category><![CDATA[Cookies]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[phpinfo]]></category>
		<category><![CDATA[wp-config.php]]></category>

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

&nbsp;
/** Add define(&#039;WP_DEBUG_LOG&#039;, true); to enable php debug logging to WP_CONTENT_DIR/debug.log */
//!defined(&#039;WP_DEBUG_LOG&#039;) &#038;&#038; define(&#039;WP_DEBUG_LOG&#039;, true);
&nbsp;
/** This determines whether errors should be printed to the screen as part of the output or if they should be hidden from the user.
 *  Add define(&#039;WP_DEBUG_DISPLAY&#039;, false); to wp-config.php to use the globally configured setting for display_errors and not force it to On */
!defined(&#039;WP_DEBUG_DISPLAY&#039;) &#038;&#038; define(&#039;WP_DEBUG_DISPLAY&#039;, false);
</pre>
<hr class="C" />
<h2>Ultimate Security Tweaks</h2>
<p>Well, ultimate for WP&#8217;s built-in keys and password functions, this is all for wp-config.php keep in mind.  This is a very neccessary and recommended step, and is one of the only things I modify for each new installation.</p>
<h3>Security KEYS</h3>
<p>If like me you are familiar with password-cracking software like John the ripper, rainbow hash tables, l0pht-crack, etc.. then you will like to know that you can specify your own keys and salts for the encryption used by WP.  They are <code>AUTH_KEY</code>, <code>AUTH_SALT</code>, <code>SECURE_AUTH_KEY</code>, <code>SECURE_AUTH_SALT</code>, <code>LOGGED_IN_KEY</code>, <code>LOGGED_IN_SALT</code>, <code>NONCE_KEY</code>, <code>NONCE_SALT</code>,  <code>SECRET_KEY</code> and <code>SECRET_SALT</code>.</p>
<p>A random and long key gives you better encryption, and exponentially increasing that is using a random and long salt for the encryption.  Encryptions with known salts are incredibly easy to decrypt compared to encryptions with secure salts, because the salt + key individually need to be guessed in order to find a matching hash, vs. just the key if the salt is known.  See: <a href="http://www.askapache.com/security/locating-weak-passwords.html">Locating weak passwords</a>.</p>
<blockquote>
<p>A secret key is a hashing salt which makes your site harder to hack and access harder to crack by adding random elements to the password.</p>
<p>In simple terms, a secret key is a password with elements that make it harder to generate enough options to break through your security barriers. A password like &#8220;password&#8221; or &#8220;test&#8221; is simple and easily broken. A random, unpredictable password such as &#8220;88a7da62429ba6ad3cb3c76a09641fc&#8221; takes years to come up with the right combination.</p>
</blockquote>
<p>For more information on the technical background and breakdown of secret keys and secure passwords, see: </p>
<ul>
<li><a href="http://wordpress.org/support/topic/170987">WordPress Support Forum &#8211; HOWTO: Set up secret keys in WordPress 2.6+</a></li>
<li><a href="http://en.wikipedia.org/wiki/Password_cracking">Wikipedia&#8217;s explanation of Password Cracking</a></li>
</ul>
<p>I like to use the <a href="https://api.wordpress.org/secret-key/1.1/">WordPress.org secret-key service</a> 4 times.  That&#8217;s because for each key and salt I like to do: (1 key from api +random keyboard input+1 key from api).</p>
<pre>
/**#@+
 * Authentication Unique Keys.
 *
 * Change these to different unique phrases!
 * You can generate these using the {@link https://api.wordpress.org/secret-key/1.1/ WordPress.org secret-key service}
 * You can change these at any point in time to invalidate all existing cookies.
 * This will force all users to have to log in again.
 *
 * @since 2.6.0
 *
 * Get salt to add to hashes to help prevent attacks.
 *
 * The secret key is located in two places: the database in case the secret key
 * isn&#039;t defined in the second place, which is in the wp-config.php file. If you
 * are going to set the secret key, then you must do so in the wp-config.php
 * file.
 *
 * The secret key in the database is randomly generated and will be appended to
 * the secret key that is in wp-config.php file in some instances. It is
 * important to have the secret key defined or changed in wp-config.php.
 *
 * If you have installed WordPress 2.5 or later, then you will have the
 * SECRET_KEY defined in the wp-config.php already. You will want to change the
 * value in it because hackers will know what it is. If you have upgraded to
 * WordPress 2.5 or later version from a version before WordPress 2.5, then you
 * should add the constant to your wp-config.php file.
 *
 * Below is an example of how the SECRET_KEY constant is defined with a value.
 * You must not copy the below example and paste into your wp-config.php. If you
 * need an example, then you can have a
 * {@link https://api.wordpress.org/secret-key/1.1/ secret key created} for you.
 *
 * Salting passwords helps against tools which has stored hashed values of
 * common dictionary strings. The added values makes it harder to crack if given
 * salt string is not weak.
 *
 * @since 2.5
 * @link https://api.wordpress.org/secret-key/1.1/ Create a Secret Key for wp-config.php
 *
 * @return string Salt value from either &#039;SECRET_KEY&#039; or &#039;secret&#039; option
 */
define(&#039;AUTH_KEY&#039;,        &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?p[B+GR{@&gt;{Yq`c|LnG;dvq#| %OA_cbBSU6,rICC1o/c)-|&#039;);
define(&#039;SECURE_AUTH_KEY&#039;, &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[Bb15baar8&#038;R-r&lt;[T|?(xhJJABGq+Ux+U$)-Hltp/&#039;);
define(&#039;LOGGED_IN_KEY&#039;,   &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[B&lt;5n6DG|YWnJ9tY2!M1L)`{-$LW~~Ia%.uCbn!P. 41o2$Z$4&#039;);
define(&#039;NONCE_KEY&#039;,       &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[Bgu&lt;wM*zewR0.{+m:bmrB?wj!B,4]Wo+4 Avk ApR-D?E&#039;);
define(&#039;SECRET_KEY&#039;,     &#039;jflkhaskljdfhkljasdhflkjashd;flkjhas;djfh;kajshdflkjashdlfkjhasdlkfhal?Vp[B52ugH6muE9r4._iZwoYKUybrqLPpv|d Xr+|yrqhUE&#039;);
&nbsp;
define(&#039;AUTH_SALT&#039;,        &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdm~Ky%+%~PPa5b YEmDI%U[W!-B&#039;);
define(&#039;SECURE_AUTH_SALT&#039;, &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmad/7o6.AU3%9o-|Kqm]+eUqr-n~:ag&#039;);
define(&#039;LOGGED_IN_SALT&#039;,   &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmsLiCv@KJ{#wd(?qe(KcH3!&#039;);
define(&#039;NONCE_SALT&#039;,       &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdmG9&gt;+wm 2)bS0Pd_+1rx0brX]ND8|&#039;);
define(&#039;SECRET_SALT&#039;,      &#039;123423190847olqkfhladhfsldshafasdfasdf09a7f-90a87df98adfyapoiyaf9asd8f70a9s8d7f908a7sdf97W4qCdm2&lt;&gt;))U|sty)+4vpWooKls/^[vN&#039;);
/**#@-*/
</pre>
<hr class="C" />
<h2>Using SSL for Admin and Login</h2>
<p>SSL is kinda required from my point of view, it is just way to easy to sniff data off the wire otherwise.  At least with SSL you force them to use tools like burpsuite, paros proxy, webscarab, etc..</p>
<pre>
/** @since 2.6.0  */
!defined(&#039;FORCE_SSL_ADMIN&#039;) &#038;&#038; define(&#039;FORCE_SSL_ADMIN&#039;, true);
&nbsp;
/** @since 2.6.0  */
!defined(&#039;FORCE_SSL_LOGIN&#039;) &#038;&#038; define(&#039;FORCE_SSL_LOGIN&#039;, true);
</pre>
<h3>Mod_Rewrite to Force SSL</h3>
<p>This is pretty cool, it forces non-https for all urls except for /wp-admin and wp-login.php, which both require https.  It also checks for the logged_in_cookie, and if that is present in the request then it doesn't force non-https.  Kinda confusing if you don't have a <a href="http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet.html">mod_rewrite cheatsheet</a>.</p>
<pre>
RewriteCond %{THE_REQUEST} ^$ [OR]
RewriteCond %{REQUEST_URI} ^/(wp-admin|wp-login\.php).*$ [NC,OR]
RewriteCond %{HTTP_COOKIE} ^.*wp_li_sadfsdfasdf11b361cdsdfasdfasd=.*$ [NC]
RewriteRule .* - [S=1]
&nbsp;
RewriteCond %{HTTPS} =on [OR]
RewriteCond %{HTTP_HOST} !^www\.askapache\.com$ [NC]
RewriteRule .* http://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
&nbsp;
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(wp-admin/.*|wp-login\.php.*)\ HTTP/ [NC]
RewriteCond %{HTTPS} !=on
RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
</pre>
<hr class="C" />
<h2>File System Permissions</h2>
<p><a class="IFR" href="http://www.askapache.com/security/chmod-umask-fileperms-stat-tricks.html"><img src="/wp-content/uploads/2008/11/danger-chmod-screenshot.png" alt="chmod, umask, file permissions test" title="chmod, umask, file permissions test" /></a>You can get a basic and solid intro on file permissions by reading: <a href="http://codex.wordpress.org/Changing_File_Permissions">Changing File Permissions</a>, or you can check out some of my <a href="http://www.askapache.com/security/chmod-umask-fileperms-stat-tricks.html">file permission research</a>.<br class="C" /></p>
<pre>
/** The permissions as octal number, usually 0644 for files, 0755 for dirs.
 *  http://codex.wordpress.org/Changing_File_Permissions
 *  if ( !$wp_filesystem-&gt;mkdir($remote_destination, FS_CHMOD_DIR) )
 */
!defined(&#039;FS_CHMOD_DIR&#039;) &#038;&#038; define(&#039;FS_CHMOD_DIR&#039;, (0755 &#038; ~ umask()));
!defined(&#039;FS_CHMOD_FILE&#039;) &#038;&#038; define(&#039;FS_CHMOD_FILE&#039;, (0644 &#038; ~ umask()));
/**#@-*/
&nbsp;
/** Define the timeouts for the connections. Only available after the construct is called to allow for per-transport overriding of the default. */
//stream_set_timeout( $stream, FS_TIMEOUT );
//!defined(&#039;FS_TIMEOUT&#039;) &#038;&#038; define(&#039;FS_TIMEOUT&#039;, 30);
&nbsp;
//$this-&gt;link = @ftp_connect($this-&gt;options[&#039;hostname&#039;], $this-&gt;options[&#039;port&#039;], FS_CONNECT_TIMEOUT);
//!defined(&#039;FS_CONNECT_TIMEOUT&#039;) &#038;&#038; define(&#039;FS_CONNECT_TIMEOUT&#039;, 30);
&nbsp;
// function get_filesystem_method($args = array(), $context = false) {
//  $method = defined(&#039;FS_METHOD&#039;) ? FS_METHOD : false; //Please ensure that this is either &#039;direct&#039;, &#039;ssh&#039;, &#039;ftpext&#039; or &#039;ftpsockets&#039;
//!defined(&#039;FS_METHOD&#039;) &#038;&#038; define(&#039;FS_METHOD&#039;, &#039;direct&#039;);
&nbsp;
/** These methods for the WordPress core, plugin, and theme upgrades try to determine the WordPress path, as reported by PHP, but symlink trickery can sometimes
 * &#039;muck this up&#039; so if you know the paths to the various folders on the server, as seen via your FTP user, you can manually define them in the wp-config.php file.
 * FS_METHOD forces the filesystem method. It should only be "direct", "ssh", "ftpext", or "ftpsockets".
 * FTP_BASE is the full path to the "base" folder of the WordPress installation.
 * FTP_CONTENT_DIR is the full path to the wp-content folder of the WordPress installation.
 * FTP_PLUGIN_DIR is the full path to the plugins folder of the WordPress installation.
 * FTP_PUBKEY is the full path to your SSH public key.
 * FTP_PRIKEY is the full path to your SSH private key.
 * FTP_USER is either user FTP or SSH username. Most likely these are the same, but use the appropriate one for the type of update you wish to do.
 * FTP_PASS is the password for the username entered for FTP_USER. If you are using SSH public key authentication this can be omitted.
 * FTP_HOST is the hostname:port combination for your SSH/FTP server. The standard FTP port is 21 and the standard SSH port is 22.
 */
//define(&#039;FS_METHOD&#039;, &#039;ftpext&#039;);
//define(&#039;FTP_BASE&#039;, &#039;/path/to/wordpress/&#039;);
//define(&#039;FTP_CONTENT_DIR&#039;, &#039;/path/to/wordpress/wp-content/&#039;);
//define(&#039;FTP_PLUGIN_DIR &#039;, &#039;/path/to/wordpress/wp-content/plugins/&#039;);
//define(&#039;FTP_PUBKEY&#039;, &#039;/home/username/.ssh/id_rsa.pub&#039;);
//define(&#039;FTP_PRIKEY&#039;, &#039;/home/username/.ssh/id_rsa&#039;);
//define(&#039;FTP_USER&#039;, &#039;username&#039;);
//define(&#039;FTP_PASS&#039;, &#039;password&#039;);
//define(&#039;FTP_HOST&#039;, &#039;ftp.example.org:21&#039;);
&nbsp;
/**
 * Block requests through the proxy.
 *
 * Those who are behind a proxy and want to prevent access to certain hosts may do so. This will
 * prevent plugins from working and core functionality, if you don&#039;t include api.wordpress.org.
 *
 * You block external URL requests by defining WP_HTTP_BLOCK_EXTERNAL in your wp-config.php file
 * and this will only allow localhost and your blog to make requests.
 * The constant WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
 * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow.
 *
 * @since 2.8.0
 * @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
/** @since 2.9  */
//!defined(&#039;WP_HTTP_BLOCK_EXTERNAL&#039;) &#038;&#038; define( &#039;WP_HTTP_BLOCK_EXTERNAL&#039;, false );
&nbsp;
/*
 * The constant WP_ACCESSIBLE_HOSTS will allow additional hosts to go through for requests. The format of the
 * WP_ACCESSIBLE_HOSTS constant is a comma separated list of hostnames to allow.
 *
 * @since 2.8.0
 * @link http://core.trac.wordpress.org/ticket/8927 Allow preventing external requests.
 * $accessible_hosts = preg_split(&#039;|,\s*|&#039;, WP_ACCESSIBLE_HOSTS);
 * return !in_array( $check[&#039;host&#039;], $accessible_hosts ); //Inverse logic, If its in the array, then we can&#039;t access it.
 */
//!defined(&#039;WP_ACCESSIBLE_HOSTS&#039;) &#038;&#038; define( &#039;WP_ACCESSIBLE_HOSTS&#039;, &#039;askapache.com,askapache.org&#039; );
</pre>
<hr class="C" />
<h3>Cookies!</h3>
<p>There&#8217;s always a little comfort in having non-default cookies for security (against auto-bots), and using shorter names also means smaller HTTP Packets.</p>
<p>The <code>$cookie_hash</code> is my hack to get around the fact that <code>COOKIEHASH</code> isn&#8217;t definable in <code>wp-config</code>.</p>
<pre>
/**#@+
 * COOKIES
 * Used to guarantee unique hash cookies @since 1.5 */
$cookie_hash=md5(WP_SITEURL);
&nbsp;
/** Set a cookie now to see if they are supported by the browser.
 * setcookie(TEST_COOKIE, &#039;WP Cookie check&#039;, 0, COOKIEPATH, COOKIE_DOMAIN);
 * @since 2.3.0 */
!defined(&#039;TEST_COOKIE&#039;) &#038;&#038; define(&#039;TEST_COOKIE&#039;, &#039;wp_tc&#039;);
&nbsp;
/* @since 2.6.0 */
!defined(&#039;LOGGED_IN_COOKIE&#039;) &#038;&#038; define(&#039;LOGGED_IN_COOKIE&#039;, &#039;wp_li_&#039; . $cookie_hash);
&nbsp;
/* @since 2.6.0 */
!defined(&#039;SECURE_AUTH_COOKIE&#039;) &#038;&#038; define(&#039;SECURE_AUTH_COOKIE&#039;, &#039;wp_sa_&#039; . $cookie_hash);
&nbsp;
/* @since 2.5.0 */
!defined(&#039;AUTH_COOKIE&#039;) &#038;&#038; define(&#039;AUTH_COOKIE&#039;, &#039;wp_a_&#039; . $cookie_hash);
&nbsp;
/* @since 2.0.0 */
!defined(&#039;PASS_COOKIE&#039;) &#038;&#038; define(&#039;PASS_COOKIE&#039;, &#039;wp_p_&#039; . $cookie_hash);
&nbsp;
/* @since 2.0.0 */
!defined(&#039;USER_COOKIE&#039;) &#038;&#038; define(&#039;USER_COOKIE&#039;, &#039;wp_u_&#039; . $cookie_hash);
&nbsp;
/* ok unset this var, its not needed as COOKIEHASH will have this value, but is not definable in wp-config.php */
unset($cookie_hash);
&nbsp;
/** @since 1.2.0 */
!defined(&#039;COOKIEPATH&#039;) &#038;&#038; define(&#039;COOKIEPATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_HOME . &#039;/&#039; ) );
&nbsp;
/** @since 1.5.0 */
!defined(&#039;SITECOOKIEPATH&#039;) &#038;&#038; define(&#039;SITECOOKIEPATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_SITEURL . &#039;/&#039; ) );
&nbsp;
/** @since 2.6.0 */
!defined(&#039;ADMIN_COOKIE_PATH&#039;) &#038;&#038; define( &#039;ADMIN_COOKIE_PATH&#039;, SITECOOKIEPATH . &#039;wp-admin&#039; );
&nbsp;
/** @since 2.6.0 */
!defined(&#039;PLUGINS_COOKIE_PATH&#039;) &#038;&#038; define( &#039;PLUGINS_COOKIE_PATH&#039;, preg_replace(&#039;|https?://[^/]+|i&#039;, &#039;&#039;, WP_PLUGIN_URL)  );
&nbsp;
/** @since 2.0.0 */
!defined(&#039;COOKIE_DOMAIN&#039;) &#038;&#038; define(&#039;COOKIE_DOMAIN&#039;, $_SERVER[&#039;SERVER_NAME&#039;]);
</pre>
<hr class="C" />
<pre>
/**
  * The WP_CACHE setting, if true, includes the wp-content/advanced-cache.php script, when executing wp-settings.php.
  * For an advanced caching plugin to use, static because you would only want one
  * if ( defined(&#039;WP_CACHE&#039;) )@include WP_CONTENT_DIR . &#039;/advanced-cache.php&#039;;
  */
!defined(&#039;WP_CACHE&#039;) &#038;&#038; define(&#039;WP_CACHE&#039;, true);
&nbsp;
/** WordPress Localized Language, defaults to en_US.
 *
 * Change this to localize WordPress.  A corresponding MO file for the chosen
 * language must be installed to wp-content/languages. For example, install
 * de.mo to wp-content/languages and set WPLANG to &#039;de&#039; to enable German
 * language support. */
!defined(&#039;WPLANG&#039;) &#038;&#038; define (&#039;WPLANG&#039;, &#039;en_US&#039;);
&nbsp;
/** Stores the location of the language directory. First looks for language folder in WP_CONTENT_DIR
 *   and uses that folder if it exists. Or it uses the "languages" folder in WPINC. @since 2.1.0 */
//!defined(&#039;WP_LANG_DIR&#039;) &#038;&#038; define(&#039;WP_LANG_DIR&#039;, ABSPATH . WPINC . &#039;/languages&#039;);
&nbsp;
/** LANGDIR defines what directory the WPLANG .mo file resides. If LANGDIR is not defined WordPress looks first to wp-content/languages and then wp-includes/languages for the .mo defined by WPLANG file.  Old static relative path maintained for limited backwards compatibility - won&#039;t work in some cases*/
//!defined(&#039;LANGDIR&#039;) &#038;&#038; define(&#039;LANGDIR&#039;, &#039;wp-content/languages&#039;);
&nbsp;
/** Stores the location of the WordPress directory of functions, classes, and core content. @since 1.0.0 */
//!defined(&#039;WPINC&#039;) &#038;&#038; define(&#039;WPINC&#039;, &#039;wp-includes&#039;);
</pre>
<hr class="C" />
<h2>WPMU Stuff</h2>
<p>I personally don&#8217;t use.</p>
<pre>
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined(&#039;WPMU_PLUGIN_DIR&#039;) &#038;&#038; define( &#039;WPMU_PLUGIN_DIR&#039;, WP_CONTENT_DIR . &#039;/mu-plugins&#039; ); // full path, no trailing slash
&nbsp;
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined(&#039;WPMU_PLUGIN_URL&#039;) &#038;&#038; define( &#039;WPMU_PLUGIN_URL&#039;, WP_CONTENT_URL . &#039;/mu-plugins&#039; ); // full url, no trailing slash
&nbsp;
/** Allows for the mu-plugins directory to be moved from the default location. @since 2.8.0 */
//!defined( &#039;MUPLUGINDIR&#039; ) &#038;&#038; define( &#039;MUPLUGINDIR&#039;, &#039;wp-content/mu-plugins&#039; ); // Relative to ABSPATH.  For back compat.
</pre>
<hr class="C" />
<h2>WordPress Database</h2>
<p>This is usually the only thing I have to manually edit when creating a new site, unless I just use the same DB and modify the $table_prefix, (farther down). I run everything I possibly can in UTF-8, but if you don&#8217;t already know alot about character sets, wow it is one of the most confusing things so you may want to save learning about that topic for another day.  Otherwise the following are helpful (<em>and show how confusing character sets are!</em>)</p>
<ul>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/charset-charsets.html">Character Sets and Collations MySQL Support</a></li>
<li><a href="http://codex.wordpress.org/Converting_Database_Character_Sets">Converting Database Character Sets</a></li>
<li><a href="http://dev.mysql.com/doc/refman/5.0/en/charset-unicode-sets.html">UTF-8 character sets</a> (<a href="http://en.wikipedia.org/wiki/UTF-8">UTF-8</a>)</li>
</ul>
<p>If you ever setup WP to use the builtin membership features, make sure you learn about the <code>CUSTOM_USER_TABLE</code> and <code>CUSTOM_USER_META_TABLE</code> constants, I&#8217;ve found them very helpful.</p>
<pre>
/**#@+
 * MySQL settings
 */
/** The name of the database for WordPress */
define(&#039;DB_NAME&#039;, &#039;askapachewpblog75&#039;);
&nbsp;
/** The username to access the database */
define(&#039;DB_USER&#039;, &#039;askapache245d&#039;);
&nbsp;
/** The password for the username to access the database */
define(&#039;DB_PASSWORD&#039;, &#039;asdfklj2340&#039;);
&nbsp;
/** The hostname to connect to the database at */
define(&#039;DB_HOST&#039;, &#039;mysql.askapache.com&#039;);
&nbsp;
/** The charset of the database */
define(&#039;DB_CHARSET&#039;, &#039;utf8&#039;);
&nbsp;
/** The collation of the database */
define(&#039;DB_COLLATE&#039;, &#039;utf8_general_ci&#039;);
</pre>
<hr class="C" />
<h2>$table_prefix</h2>
<p>The <code>$table_prefix</code> is the value placed in the front of your database tables. Change the value if you want to use something other than wp_ for your database prefix. Typically this is changed if you are <a href="http://codex.wordpress.org/Installing_Multiple_Blogs">installing multiple WordPress blogs</a> in the same database, and also for enhanced security.</p>
<p>Its a safe and good idea to change this value pre-installation to add more security to your WordPress blog. Exploits attempted against your WordPress blog by malicious crackers often are built with the premise that your blog uses the prefix wp_, by changing the value you mitigate some attack vectors. </p>
<pre>
/**
 * WordPress Database Table prefix.
 *
 * You can have multiple installations in one database if you give each a unique
 * prefix. Only numbers, letters, and underscores please!
 */
$table_prefix  = &#039;ar15_&#039;;
&nbsp;
/** CUSTOM_USER_TABLE and CUSTOM_USER_META_TABLE are used to designated that the user and usermeta tables normally utilized by WordPress are not used, instead these values/tables are used to store your user information. */
//!defined(&#039;CUSTOM_USER_TABLE&#039;) &#038;&#038; define(&#039;CUSTOM_USER_TABLE&#039;, $table_prefix . &#039;my_users&#039;);
//!defined(&#039;CUSTOM_USER_META_TABLE&#039;) &#038;&#038; define(&#039;CUSTOM_USER_META_TABLE&#039;, $table_prefix . &#039;my_usermeta&#039;);
</pre>
<h2>Setup PHP Ini Settings</h2>
<pre>
&nbsp;
/** Turns the output of errors on or off, you really never want this on, you should only view errors by reading the log file. */
ini_set(&#039;display_errors&#039;, WP_DEBUG_DISPLAY);
&nbsp;
/** Tells whether script error messages should be logged to the server&#039;s error log or error_log. */
ini_set(&#039;log_errors&#039;, &#039;On&#039;);
&nbsp;
/** http://us.php.net/manual/en/timezones.php */
ini_set(&#039;date.timezone&#039;, &#039;America/Indianapolis&#039;);
&nbsp;
/** Where to log php errors */
ini_set(&#039;error_log&#039;, ASKAPACHE_ROOT . &#039;/logs/php_error.log&#039;);
&nbsp;
/** Set the memory limit, otherwise defaults to &#039;32M&#039; */
ini_set(&#039;memory_limit&#039;, WP_MEMORY_LIMIT);
</pre>
<h2>Sessions are slow</h2>
<p>So I only use sessions when I have a specific use&#8230; In this case I need sessions only when one of the tools in the /online-tools/ directory is being used.  And that is for the <a href="http://www.askapache.com/security/php-captcha-anti-spam-example.html">captcha image</a>.  In the future I won&#8217;t ever use sessions.</p>
<pre>
if(preg_match( &#039;#^/online-tools/#&#039;,$_SERVER[&#039;REQUEST_URI&#039;])) session_start();
</pre>
<h2>Include Custom Files</h2>
<p>Sure you could use the my-hacks.php that WP allows, or you can just stick your functions in your <code>TEMPLATEPATH/functions.php</code> file, but they are executed only after the wp-settings.php file, which may be too late for your file.</p>
<p>In the past I&#8217;ve also used the <a href="http://us2.php.net/manual/en/ini.core.php#ini.auto-prepend-file">auto_prepend_file</a> settings to run my script before anything (index.php) but I ran into some issues on different hosts, and it wasn&#8217;t as portable.</p>
<p>This is useful because you can have a file with globally available functions that you can use in non-WP areas as well as WP areas.  I am moving away from this more and more as I learn more about classes and build plugins instead for portability.</p>
<pre>
include_once ASKAPACHE_ROOT . &#039;/includes/myfunctions.inc&#039;;
&nbsp;
/** Sets up WordPress vars and included files. */
require_once(ABSPATH . &#039;wp-settings.php&#039;);
?&gt;
</pre>
<h2>Some Useful PHP</h2>
<p>I am constantly trying to make my sites and code more portable, so I am using plugins alot more to accomplish things that I use to do with separate php.  Here are some examples of minimal php.</p>
<pre>
add_filter("the_generator", create_function(&#039;$a&#039;,&#039;return "";&#039;));
add_filter(&#039;the_content&#039;, create_function(&#039;$a&#039;, &#039;return ((is_feed())? $a."&lt;p&gt;&lt;a href=\"".get_permalink()."\"&gt;".get_the_title()."&lt;/a&gt; originally appeared on ".get_bloginfo("name").".&lt;/p&gt;" : $a);&#039;), 99999);
add_filter(&#039;excerpt_length&#039;, create_function(&#039;$a&#039;, &#039;return 300;&#039;),99);
add_filter(&#039;excerpt_more&#039;, create_function(&#039;$a&#039;, &#039;return "&hellip;";&#039;),99);
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"pingback\" href=\"&#039;.get_bloginfo(&#039;pingback_url&#039;).&#039;\" /&gt;\n";&#039;), 95 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"schema.rss\" href=\"http://purl.org/rss/1.0/\" /&gt;\n";&#039;), 96 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"schema.rel\" href=\"http://purl.org/vocab/relationship/\" /&gt;\n";&#039;), 97 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link rel=\"meta\" type=\"application/rdf+xml\" href=\"/foaf.rdf\" /&gt;\n";&#039;), 98 );
add_action( &#039;wp_head&#039;, create_function(&#039;$a&#039;,&#039;echo "&lt;link href=\"/favicon.ico\" rel=\"shortcut icon\" type=\"image/x-icon\" /&gt;\n";&#039;), 99 );
</pre>
<h2>Debugging Note</h2>
<p><a href="http://wordpress.org/extend/plugins/askapache-debug-viewer/screenshots/"><img alt="AskApache Advanced Debugging Output" src="http://s.wordpress.org/extend/plugins/askapache-debug-viewer/screenshot-1.png?r=160129" title="AskApache Advanced Debugging Output" width="625" height="548" /></a>If you read this far than you probably know how important debugging is, but I sometimes like to stick the best tips deep in my articles to make sure only YOU find it.  GRTFM isn&#8217;t used on this site, it&#8217;s mostly a requirement because my writing can get pretty bad..  The point, debugging is more than a crucial requirement if you want to do anything cool.  Don&#8217;t worry I got you.. check my <a href="http://wordpress.org/extend/plugins/askapache-debug-viewer/">AskApache Debug Viewer Plugin from the official WP site</a>.  It&#8217;s pretty close to providing as verbose amount of information that I could possibly figure out how to get out of php, probably more than you have ever seen at least, I focused on quantity.  I use it all the time on new installs as there is no setup required and it tells me advanced information about the setup of the server, hacker code for sure.<br class="C" /></p>
<p>Here&#8217;s a quick function to see set global vars, I just think this is interesting code.</p>
<pre>
function askapache_global_debug(){
  global $_GET,$_POST,$_COOKIE,$_SESSION,$_ENV,$_FILES,$_SERVER,$_REQUEST,$HTTP_POST_FILES,$HTTP_POST_VARS,$HTTP_SERVER_VARS,$HTTP_RAW_POST_DATA,$HTTP_GET_VARS,$HTTP_COOKIE_VARS,$HTTP_ENV_VARS;
  $gv=create_function(&#039;$n&#039;,&#039;global $$n; ob_start(); if ( is_array($$n) &#038;&#038; sizeof($$n)&gt;0 &#038;&#038; print("[{$n}]\n") ) print_r($$n);return ob_get_clean();&#039;);
  foreach (array(&#039;_GET&#039;,&#039;_POST&#039;,&#039;_COOKIE&#039;,&#039;_SESSION&#039;,&#039;_ENV&#039;,&#039;_FILES&#039;,&#039;_SERVER&#039;,&#039;_REQUEST&#039;,&#039;HTTP_POST_FILES&#039;,&#039;HTTP_POST_VARS&#039;,&#039;HTTP_SERVER_VARS&#039;,&#039;HTTP_RAW_POST_DATA&#039;,&#039;HTTP_GET_VARS&#039;,&#039;HTTP_COOKIE_VARS&#039;,&#039;HTTP_ENV_VARS&#039;) as $k)echo $gv($k);
  print_r(get_defined_constants());
}
</pre>
<p class="anote">Also check the WordPress Codex page: <a href="http://codex.wordpress.org/Editing_wp-config.php">Editing wp-config.php</a></p>
<p><a href="http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html">Advanced WordPress wp-config.php Tweaks</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/wordpress/advanced-wp-config-php-tweaks.html/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>mod_rewrite Fix for Caching Updated Files</title>
		<link>http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html</link>
		<comments>http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html#comments</comments>
		<pubDate>Sun, 30 Aug 2009 13:20:59 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[Cache-Control]]></category>
		<category><![CDATA[caching]]></category>
		<category><![CDATA[If-Modified-Since]]></category>

		<guid isPermaLink="false">http://www.askapache.com/htaccess/mod_rewrite-code-to-fix-caching-updated-files.html</guid>
		<description><![CDATA[<p>Web Developers sometimes use <code>file.ext?v=004</code> as a version control system to force visitors to use updated files.  <strong>This is terrible.</strong>  Instead link to <code>apache-003.css</code> and set it to be cached forever. When you change the file you just change the links to <code>apache-004.css</code>. That eliminates millions of bandwidth and resource robbing If-Modified-Since requests. You only need Apache with mod_rewrite, and 1-10 minutes!</p>]]></description>
			<content:encoded><![CDATA[<p><strong>Web Developers sometimes use</strong> <code>file.ext?v=137</code> as a <strong>version control system</strong> so they can force visitors to use an updated file.  <strong>This is so terrible</strong>.  Instead link to <code>apache-003.css</code> and set it to be cached forever. When you change the file you just change the links to <code>apache-004.css</code>.</p>
<h2>Raw Speed Benefit</h2>
<p>This eliminates millions of bandwidth and resource robbing <code>304 If-Modified-Since</code> requests.</p>
<hr />
<h2>Renaming links vs. Renaming files</h2>
<p>On the server my files are named <strong>apache.css</strong> and <strong>apache.js</strong>, but in the xhtml I point to them using the names <code>apache-113.css</code> and <code>apache-113.js</code>, after I change the file I just add 1 to the number, and the new file is cached. They are internally redirected to apache.css and apache.js (invisible to the user) The concept is similar to a &#8220;shortcut&#8221; in windows or a symlink in BSD.  The trick is that I never actually rename the files on the server.  I just rename them in the html.  That means <code>apache-135.css</code> is served from the file apache.css but the browser/cache only see and know about <code>apache-135.css</code>.</p>
<h2>XHTML</h2>
<p><strong>NOTE</strong>: You can do your own investigating of this sites source code and <a href="http://www.askapache.com/online-tools/http-headers-tool/">HTTP headers</a> to see this whole system in action</p>
<pre>
&lt;link href="http://z.askapache.com/z/c/apache-0031.css" rel="stylesheet" type="text/css" /&gt;
&lt;script src="http://z.askapache.com/z/j/apache-0031.js" type="text/javascript"&gt;&lt;/script&gt;
</pre>
<h2>mod_rewrite code for htaccess or httpd.conf</h2>
<p><strong>Updated:</strong> 10/20/2008</p>
<pre>
RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} ^(GET|HEAD)\ /z/([a-z]+)/(.+)-([0-9]+)\.(js|css).*\ HTTP/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule .+ /z/%2/%3.%5 [NC,L]
</pre>
<h3>Alternate mod_rewrite code</h3>
<pre>
RewriteEngine On
RewriteBase /
RewriteRule ^([cij]+)(/?[a-z]*)/([a-z]+)-([0-9]+)\.([a-z]+)$ /$1$2/$3.$5 [L]
</pre>
<h2>Ideal Caching Scheme</h2>
<p>Ok so you want the xhtml to be the only file that isn&#8217;t cached without being validated, its simple to <a href="http://www.askapache.com/htaccess/speed-up-sites-with-htaccess-caching.html" title="Speed Up Sites with htaccess Caching">setup your own caching scheme</a>.</p>
<h3>Bad Cache information for a file with the <code>?v=foo</code> hack</h3>
<blockquote><p>This object will be fresh for 1 week. It can be validated with Last-Modified. This object requests that a Cookie be set; this makes it and other pages affected automatically stale; clients must check them upon every request. Because it contains a query (&#8216;?&#8217;) in the URL, many caches will not keep this object.</p>
</blockquote>
<p><a href="http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html">mod_rewrite Fix for Caching Updated Files</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>.htaccess trick to show Alternate CSS file based on IP</title>
		<link>http://www.askapache.com/htaccess/htaccess-trick-to-show-alternate-css-file-based-on-ip.html</link>
		<comments>http://www.askapache.com/htaccess/htaccess-trick-to-show-alternate-css-file-based-on-ip.html#comments</comments>
		<pubDate>Mon, 20 Oct 2008 21:17:00 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[trick]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=1724</guid>
		<description><![CDATA[<p><a class="IFL" href="http://www.askapache.com/htaccess/htaccess-trick-to-show-alternate-css-file-based-on-ip.html" title=".htaccess trick to show Alternate CSS file based on IP"><img src="/wp-content/uploads/2008/10/green-light-bulb-67x116.png" alt=".htaccess trick to show Alternate CSS file based on IP" title=".htaccess trick shows Development CSS file only to Developer" /></a>This past week I updated my sites <a href="http://z.askapache.com/z/c/apache-0031.css">apache.css file</a> for a <strong>site-redesign</strong>.  I wanted to make changes to the .css file that only I could see, so that my regular traffic and site-visitors would still see the old version.  Here's the elegant solution I came up with using <a href="http://www.askapache.com/htaccess/htaccess.html">.htaccess</a> and <a href="http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet.html">mod_rewrite</a> that works so well I'm sharing it with all you wonderful and incredible people reading my blog :)<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href="http://www.askapache.com/htaccess/htaccess-trick-to-show-alternate-css-file-based-on-ip.html" title=".htaccess trick to show Alternate CSS file based on IP"><img src="/wp-content/uploads/2008/10/green-light-bulb-67x116.png" alt=".htaccess trick to show Alternate CSS file based on IP" title=".htaccess trick shows Development CSS file only to Developer" /></a>This past week I was making changes to my sites <a href="http://z.askapache.com/z/c/apache-0031.css">apache.css file</a> for a <strong>site-redesign</strong>.  I wanted to make changes to the .css file that only I could see, so that my regular traffic and site-visitors would still see the old version.  I quickly came up with an elegant solution using the incredibly powerful <a href="http://www.askapache.com/htaccess/htaccess.html">.htaccess</a> and <a href="http://www.askapache.com/htaccess/mod_rewrite-variables-cheatsheet.html">mod_rewrite</a> that worked so well I wanted to share it with all you great and interesting people :)<br class="C" /></p>
<hr class="C" />
<h2>Why and How to Use</h2>
<p>So to develop the new site&#8217;s css file I created a new file on my server called apachenew.css, and the old file was called apache.css, this trick simply shows anyone accessing the site from a certain IP address the apachenew.css file instead of the apache.css file.  Cool huh!?!  So I can edit the apachenew.css file and preview the site with the new css while everyone else still sees the old css.  When I am finished I just save apachenew.css as apache.css and remove this .htaccess code.  Sweet!</p>
<hr class="C" />
<p class="anote"><strong>Updated:</strong> I got some emails from you all asking for a clearer ready-to-use example, especially from WordPress bloggers.  Here you go!</p>
<h2>.htaccess code for WordPress</h2>
<p>Ok find your <code>.htaccess file</code></p>
<pre class='brushhtaccess'>
# BEGIN WordPress
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
&lt;/IfModule&gt;
&nbsp;
# END WordPress
</pre>
<hr class="C" />
<h2>The New htaccess</h2>
<p>This is assuming that your themes real .css file is <code>/wp-content/themes/yourtheme/stylesheet.css</code> and the developer .css file you will only be able to see is located at <code>/wp-content/themes/yourtheme/stylesheet-new.css</code></p>
<pre class='brushhtaccess'>
&lt;Files stylesheet-new.css&gt;
&lt;IfModule mod_headers.c&gt;
Header set Cache-Control "must-revalidate, no-store, no-cache"
&lt;/IfModule&gt;
&lt;/Files&gt;
&nbsp;
RewriteEngine On
RewriteBase /
&nbsp;
RewriteCond %{REMOTE_ADDR} =208.113.134.190
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /wp-content/themes/yourtheme/stylesheet.css.* HTTP/ [NC]
RewriteRule ^wp-content/themes/yourtheme/stylesheet\.css$ /wp-content/themes/yourtheme/stylesheet-new.css [L]
&nbsp;
# BEGIN WordPress
&lt;IfModule mod_rewrite.c&gt;
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
&lt;/IfModule&gt;
&nbsp;
# END WordPress
</pre>
<p class="anote"><strong>Note:</strong> The real filename is <code>apache.css</code>, the <code>-0031</code> part is because I use the incredibly useful <a href="http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html">mod_rewrite updated file caching techinque</a> which allows me to force clients to use updated versions of my <a href="http://www.askapache.com/css/">.css</a> file by renaming it, while at the same being able to set <a href="http://www.askapache.com/htaccess/apache-speed-expires.html">Far Future Expires Headers for optimum caching</a>.</p>
<hr class="C" />
<h2>Changes to XHTML</h2>
<p><strong>None!</strong>  The link to include my <a href="http://www.askapache.com/css/">.css file</a> within the <code>&lt;head&gt;&lt;/head&gt;</code> of my pages <a href="http://www.askapache.com/xhtml/">XHTML</a> remains the same.</p>
<pre>
&lt;link rel="stylesheet" type="text/css" href="http://z.askapache.com/z/c/apache-0031.css" /&gt;
</pre>
<hr class="C" />
<h2>.htaccess code to show alternate .css file based on IP</h2>
<p>So my browser makes a request for the apache-0031.css file, and IF the request originates from the IP address <code>208.113.134.190</code> then this code will instead serve the apachenew.css file AND then it uses the <code>S=1</code> RewriteRule flag to skip over the next RewriteRule Block, which is my <a href="http://www.askapache.com/htaccess/mod_rewrite-fix-for-caching-updated-files.html">updated file caching techinque</a> trick.  If you don&#8217;t use that you won&#8217;t need to skip any rules or use the 2nd RewriteRule block below, just the first.</p>
<pre class='brushhtaccess'>
RewriteEngine On
RewriteBase /
&nbsp;
RewriteCond %{REMOTE_ADDR} =208.113.134.190
RewriteCond %{THE_REQUEST} ^(GET|HEAD) /z/c/apache-([0-9]+).css.* HTTP/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^z/c/apache-([0-9+]).css$ /z/c/apachenew.css [L,S=1]
&nbsp;
RewriteCond %{THE_REQUEST} ^(GET|HEAD) /z/([cj]+)/(.+)-([0-9]+).(js|css).* HTTP/ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^z/([cj]+)/.*.(css|js)$ /z/%2/%3.%5 [NC,L]
</pre>
<hr class="C" />
<h2>Turn OFF Caching for Development CSS</h2>
<p>The next thing I wanted to automate was to turn off the caching of the apachenew.css file, which only I can see so there is no need to cache.  To do this with my current caching scheme I simply add the <code>must-revalidate</code> header to the headers sent for that file.</p>
<pre class='brushhtaccess'>
&lt;Files apachenew.css&gt;
&lt;IfModule mod_headers.c&gt;
Header set Cache-Control "must-revalidate"
&lt;/IfModule&gt;
&lt;/Files&gt;
</pre>
<hr class="C" />
<p>What do you think?  Questions/Improvements/Comments Welcome!</p>
<p><a href="http://www.askapache.com/htaccess/htaccess-trick-to-show-alternate-css-file-based-on-ip.html">.htaccess trick to show Alternate CSS file based on IP</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/htaccess/htaccess-trick-to-show-alternate-css-file-based-on-ip.html/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>SEO Secrets of AskApache Part 2</title>
		<link>http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html</link>
		<comments>http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html#comments</comments>
		<pubDate>Fri, 17 Oct 2008 21:44:22 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[DreamHost]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Hacking]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Linux Unix BSD]]></category>
		<category><![CDATA[Making Money]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Server Administration]]></category>
		<category><![CDATA[Web Design]]></category>
		<category><![CDATA[Web Hosting]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[htaccess]]></category>
		<category><![CDATA[mod_rewrite]]></category>
		<category><![CDATA[askapache]]></category>
		<category><![CDATA[Pagerank]]></category>
		<category><![CDATA[seo secrets]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=567</guid>
		<description><![CDATA[<p><a rel="lb" class="IFL hs hs31" href='http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html' title="Advanced SEO part 2: Search Engine Indexing and Pagerank Control"></a>This is part II of the <a href="http://www.askapache.com/seo/seo-secrets.html">Advanced SEO used on AskApache.com Series</a> and describes how to control which urls are indexed by Search Engines and how to move them higher up in Search Results.<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p>In <a href="http://www.askapache.com/seo/seo-secrets.html">part I: SEO Secrets of AskApache.com</a> we talked about content and building a website to be your &#8220;SEO Base&#8221;.  This article discusses some advanced SEO concepts to get a site indexed, move your best pages higher in search results, and controlling the pagerank/seo-juice of your site.  but relatively easy ways to control and tweak WHAT urls on your site are indexed, and HOW.  I&#8217;ve heard some people refer to this as &#8220;controlling pagerank flow&#8221; and &#8220;controlling pagerank juice&#8221;, basically we want our best pages to rank higher in the search engine results.</p>
<p><strong>Big Picture:</strong> Going from no website to AskApache.com in less than a year can be accomplished by anyone with unique content and a resolve to avoid any shortcuts and take it one step at a time.</p>
<p class="cnote">We want what Google wants, to provide the most relevant content for someone who is doing a search.   Basically, you want every url on your site that has unique content to be included in the index.  In other words, <strong>you have to think like a search engine</strong>!</p>
<hr class="C" />
<h2>The Goal of Google</h2>
<p>Here&#8217;s what I mean, Google approaches search with the overwhelming goal of bringing the content to a searcher that is the most-likely to be what that searcher is searching for.  Another way of looking at it is something I read on Google&#8230;</p>
<blockquote cite="http://www.google.com/"><p>Google&#8217;s goal is to get you off of their site as fast as possible by providing you with exactly what you are looking for.</p></blockquote>
<hr class="C" />
<h2>Think about SEO like this</h2>
<p>If you search for <a href="http://www.google.com/search?aq=f&#038;complete=1&#038;hl=en&#038;q=htaccess+tutorial+for+seo&#038;btnG=Search" title="Google Search for htaccess tutorial for seo">htaccess tutorial for seo</a> on Google, would you be more likely to visit a <strong>tutorial about using .htaccess for seo</strong> or <strong>a category page for htaccess articles</strong>?  AskApache.com has both of those urls included in the index, but the article ranks higher than the category page, as it very well should.</p>
<hr class="C" />
<h2>Get Your URLS Indexed</h2>
<p>Before I explain how I am able to help Google and other search engines rank my article pages higher than my category pages, we need to get the urls in the index or nothing will show up.  There are many well-discussed methods for getting included in the index, so I&#8217;ll just list a few that I use.</p>
<ol>
<li>Provide High-Quality original content, people will link to it</li>
<li>Get a sitemap and use <a href="https://www.google.com/webmasters/tools/siteoverview?hl=en">Google Webmaster Tools</a></li>
<li>Publish an <a href="http://feeds.askapache.com/apache/htaccess">RSS/Atom Feed</a> and ping the net when you publish a post</li>
<li>Use robots.txt and robots meta tags</li>
</ol>
<h3>Your URLs in the index</h3>
<p>Here&#8217;s how to find out which of your pages are indexed.</p>
<ul>
<li>Indexed pages in your site: <a href="http://www.google.com/search?q=site:www.askapache.com">site:</a></li>
<li>Pages that link to your site&#8217;s front page: <a href="http://www.google.com/search?q=link:www.askapache.com">link:</a></li>
<li>The current cache of your site: <a href="http://www.google.com/search?q=cache:www.askapache.com">cache:</a></li>
<li>Information about your site: <a href="http://www.google.com/search?q=info:www.askapache.com">info:</a></li>
<li>Pages that are similar to your site: <a href="http://www.google.com/search?q=related:www.askapache.com">related:</a></li>
</ul>
<hr class="C" />
<h2>Break It Down</h2>
<p>Yo homeslice! I didn&#8217;t mean break dance..  I mean lets simplify AskApache in the context of getting our urls indexed high/low.  Here&#8217;s the stats:  <strong>1 Homepage, 206 Articles, 19 Pages, 31 Categories</strong></p>
<h3>1 Homepage</h3>
<p>This page is generally the highest ranking page in the index, it should contain links to your best urls, and provide easy navigation</p>
<h3>206 Specific Topic Articles</h3>
<p>These are the article&#8217;s (like this one) of AskApache.com and are the main source of search engine traffic.  You want each url (if its a good article) to be ranked as high as possible.  Some keys are to really make each article specific to a topic by using best-practice (X)HTML.</p>
<h3>19 Static Pages</h3>
<p>Most of these are pages like the online-tools hosted on this site, or other basic pages like about, contact us, site-map, etc..  Some of these you may want to rank very high ( like the /about/ page ) and some you may not want to even be included in the index.</p>
<h3>31 Specific Topic Category Pages</h3>
<p>These are tricky because they are generally just lists of articles from each category, which isn&#8217;t specific enough to get much seach-engine-traffic, but is very useful to site visitors.  I beefed up my category pages by adding additional information about the category topic in addition to excerpts of the articles.</p>
<hr class="C" />
<h2>Higher Pagerank = Higher Up in Search Results</h2>
<p>So Googlebot and other search engine robots have these crazy complicated algorithms (many patented) that SEO Industry types may get caught up in and try to technically analyze them.  I&#8217;m sure you&#8217;ve seen/read/heard the complicated advice that will always be pushed by many&#8230; advice like:</p>
<ul>
<li>analyze the number of words in the description/title/1st paragraph/etc.</li>
<li>Make sure your &#8220;keyword&#8221; is sprinkled throughout the text every 10-30th word..</li>
<li>Other equally unexciting technical analysis</li>
</ul>
<p>Now if you&#8217;ve had success with that then props to you, success is success, but I personally choose to completely ignore all that.  The number 1 thing that the top search engines advise is to design your page for a <strong>Human Visitor</strong>, not a computer.  The golden rule for me is how I would rank the page, not how some algorithm would.</p>
<hr class="C" />
<h2>Designing for a Human Visitor</h2>
<p>This is a major factor in your site being at the top vs. nowhere.   You design your HTML to be as minimal as possible (see source code for my homepage) and contain ONLY the neccessary elements.  Above all, use semantically sound XHTML markup.  (view source of <a href="http://www.w3.org/" title="World Wide Web Consortium"><acronym title="World Wide Web Consortium">W3C</acronym></a>)</p>
<h3>External CSS/Javascript</h3>
<p>Get your javascript and CSS out of your HTML and use external files (like this site) ALWAYS!  You should start with just the HTML, no css, no colors, no javascript, and THEN you add the .css and then you add the javascript.</p>
<h3>Site Accessibility</h3>
<p>Say your browser didn&#8217;t have a mouse, didn&#8217;t support images, css, javascript, or even colors!  Your HTML should be structured such that your page is still easily readable and easy to navigate.  You can use lynx, links, and many other terminal-based browsers to test for this&#8230; please see the <a href="http://www.w3.org/WAI/">Web Accessibility Initiative (<acronym title="Web Accessibility Initiative">WAI</acronym>)</a> for detailed info.</p>
<blockquote cite="http://en.wikipedia.org/wiki/Web_accessibility"><p><a href="http://en.wikipedia.org/wiki/Web_accessibility">Web accessibility</a> refers to the practice of making websites usable by people of all abilities and disabilities. When sites are correctly designed, developed and edited, all users can have equal access to information and functionality. For example, when a site is coded with semantically meaningful HTML, with textual equivalents provided for images and with links named meaningfully, this helps blind users using text-to-speech software and/or text-to-Braille hardware.</p>
</blockquote>
<hr class="C" />
<h2>Controlling a URL&#8217;s Pagerank</h2>
<p>A few tools and techniques are available for controlling the &#8220;juice&#8221; or &#8220;pagerank&#8221; of your urls.</p>
<ol>
<li>Robots.txt</li>
<li>Robots Meta Tags</li>
<li>Links</li>
</ol>
<h2>Robots.txt</h2>
<p>I&#8217;ve done quite a bit of research and experimentation with <a href="http://www.askapache.com/search/robots.txt">robots.txt files</a>, which is a file located in the root of your website at <a href="http://www.askapache.com/robots.txt">http://www.askapache.com/robots.txt</a> that is downloaded by all legitimate search engine spiders/bots and used as a Blacklist to prevent certain urls from being indexed.  Here are a few of the articles on this site, which you may skip if you like as they don&#8217;t illustrate the big-picture that I am going to discuss now.</p>
<ul>
<li><a href="http://www.askapache.com/seo/robotstxt-mattcutts-noindex.html">Control Flow of Pagerank with robots.txt and NoFollow, NoIndex</a></li>
<li><a href="http://www.askapache.com/seo/updated-robotstxt-for-wordpress.html">WordPress robots.txt</a></li>
<li><a href="http://www.askapache.com/seo/seo-with-robotstxt.html">SEO with Robots.txt</a></li>
<li><a href="http://www.askapache.com/google/adsense-robots.html">Google AdSense using robots.txt</a></li>
<li><a href="http://www.askapache.com/seo/wordpress-robotstxt-seo.html">WordPress robots.txt file optimized for SEO and Google</a></li>
</ul>
<h3>How To Use Robots.txt</h3>
<p>Even though robots.txt files are for whitelisting and blacklisting urls, I have found that they should only be used as an extreme form of blacklisting.  When you Disallow a url in your robots.txt file, that means most search engine bots won&#8217;t even LOOK at the url.  As you can see in the below example, I only disallow urls that shouldn&#8217;t ever be LOOKED at.  The real powertool is the <strong>robots meta tag</strong>.</p>
<pre>
User-agent: *
Disallow: /cgi-bin
Disallow: /wp-admin
Disallow: /wp-includes
Disallow: /wp-content
&nbsp;
Sitemap: http://www.askapache.com/sitemap.xml
</pre>
<hr class="C" />
<h2>Robots Meta Tag</h2>
<p>Ok I&#8217;m really trying to simplify, because what you should understand is the big-picture.  Every page can have a robots meta tag in the header, and this robots meta tag can tell the search-engine to index/not-index AND follow/not-follow.  Here are some examples:</p>
<pre>
&lt;meta name="robots" content="index" /&gt;
&lt;meta name="robots" content="noindex" /&gt;
&lt;meta name="robots" content="noindex,follow" /&gt;
&lt;meta name="robots" content="index,nofollow" /&gt;
</pre>
<h3>content=&#8221;index&#8221; / noindex</h3>
<p><code>index</code> means the search engine is free to index, archive, cache, and follow the page whereas <code>noindex</code> means DO NOT include this page in the search engine results.</p>
<h3>content=&#8221;follow&#8221; / nofollow</h3>
<p><code>follow</code> means the search engine is free to LOOK at the page and follow the links on the page whereas <code>nofollow</code> means DO NOT follow the links on the page.</p>
<hr class="C" />
<h3>WordPress Auto-Robots meta tag code</h3>
<p>Just add this to any plugin file and it will add the right robots meta tag to your site..  tweak to taste.</p>
<pre>
function askapache_robots_header(){
 global $wpdb;
&nbsp;
 $robot = &#039;&lt;meta name="robots" content="noindex,follow,nocache,noarchive" /&gt;&#039;;

 if ( is_paged() || is_search() || is_404() || is_author() || is_tag() )
   $robot = &#039;&lt;meta name="robots" content="noindex,follow" /&gt;&#039;;
 elseif ( is_home() || is_front_page() || is_single() )
   $robot = &#039;&lt;meta name="robots" content="follow,index" /&gt;&#039;;
 elseif ( is_category() || is_page() )
   $robot = &#039;&lt;meta name="robots" content="follow" /&gt;&#039;;
&nbsp;
 echo $robot . "\n";
}
add_action( &#039;wp_head&#039;, &#039;askapache_robots_header&#039; );
</pre>
<hr class="C" />
<h2>Links</h2>
<p>External and Internal Links are the crux of SEO.  It&#8217;s important to start FIRST on your Internal Links and linking structure&#8230; Once you are satisfied that the correct pages are indexed and ranked appropriately, then you can begin to look at external links.</p>
<ul>
<li>The fewer links on a page, generally the better.</li>
<li>If every page of your site points to the same url on your site, pagerank goes up from the number of internal links.</li>
<li>Use of the <code>rel</code>, <code>title</code>, <code>alt</code> attribute semantically is very helpful.  (next, prev, index)</li>
<li>Put your best links higher up in the XHTML, and put helpful/solid links at the end.</li>
<li>You can add <code>rel="nofollow"</code> to links that you dont want followed.</li>
</ul>
<p>The web has gotten to be so full of malicious/non-helpful SEO activity that I recommend developing your content NOT external links.  If you want to do this right and provide great content that makes search engine users happy and makes the web better, then explore this blog and develop content until the next article in this series, where I&#8217;ll show you how to <strong>make your site explode</strong>.</p>
<p class="anote">Stay tuned for Part III, which will dive deeper into the pipeworks of AskApache.com</p>
<p><a href="http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html">SEO Secrets of AskApache Part 2</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/seo/seo-advanced-pagerank-indexing.html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>SEO Boost from Google 404 Plugin</title>
		<link>http://www.askapache.com/ajax/404-google-wordpress-plugin.html</link>
		<comments>http://www.askapache.com/ajax/404-google-wordpress-plugin.html#comments</comments>
		<pubDate>Tue, 01 Jul 2008 15:11:16 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[Ajax]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[Google]]></category>
		<category><![CDATA[Javascript]]></category>
		<category><![CDATA[Making Money]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[SEO]]></category>
		<category><![CDATA[Webmaster]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[WordPress Plugins]]></category>

		<guid isPermaLink="false">http://www.askapache.com/seo/404-google-wordpress-plugin.html</guid>
		<description><![CDATA[<p><a class="IFL hs hs33" href="http://www.askapache.com/google-seo-wordpress-yaHOO-robots" rel="nofollow" title="404 Not Found page using Google Ajax Search API"></a><strong>1 minute Install!</strong><br />Turns every 404 Not Found error into a SEO traffic generating event! Now you have many unique users with unique IP addresses and cookies searching your blog on all of the Google Indexes... <strong>Sweet!</strong><br /><br /><a href="http://www.askapache.com/google-wordpress-plugin-htaccess-robots-php-plugin.html?linux=bsd&#38;g=354" rel="nofollow">&#171;Take My 404 for a Test-Drive</a><br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html#aademo">Demo</a> | <a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html#aadl">Download</a> | <a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html#aai">Installation</a> | <a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html#aaf">FAQ</a> | <a href="http://www.askapache.com/seo/404-google-wordpress-plugin.html#aass">Screenshots / Video</a></p>
<p><strong>AskApache Google 404</strong> is a <strong>must-have</strong> WordPress plugin that uses some ajax and a couple tricks to display a very helpful and SEO Error Page.  The default displays Google Search Results for <strong>images, news, blogs, videos, web, custom search engine, and your own site</strong>.<br class="C" /></p>
<p class="bnote"><strong>Updated:</strong>  01/26/2008<br /><strong>Install Time:</strong>   10 seconds to 5 minutes<br /><strong>Install Difficulty:</strong>   Super Easy</p>
<h2><a id="aademo"></a>Demo 404 Error Page</h2>
<p><a class="IFL hs hs33" href="http://www.askapache.com/google-seo-wordpress-yaHOO-robots" rel="nofollow" title="404 Not Found page using Google Ajax Search API">Click Image</a><br class="C" /></p>
<p class="anote"><strong>Heads Up:</strong>  I&#8217;ve been thinking about ways to improve this plugin for awhile now, and I&#8217;m going to be releasing an upgrade in the coming weeks!  Any specific feature requests let me know~</p>
<h2><a id="aadl"></a>Downloads</h2>
<div class="dlarea">
<div class="dlin">
<ol>
<li><a href="http://wordpress.org/extend/plugins/askapache-google-404/">askapache-google-404</a></li>
</ol>
</div>
</div>
<h2><a id="aai">404.php Installation</a></h2>
<ol>
<li>Upload <code>zip/tar.gz</code> file to the <code>/wp-content/plugins/</code> directory and unzip.</li>
<li>Activate the plugin through the &#8216;Plugins&#8217; menu in WordPress.</li>
<li>Go to your Options Panel and open the &#8220;AA Google 404&#8243; submenu. <code>/wp-admin/options-general.php?page=askapache-google-404.php</code></li>
<li>Enter in your Google Search API Key and hit the &#8220;Update Key&#8221; Button. <a href="http://code.google.com/apis/ajaxsearch/signup.html">(Get One)</a></li>
<li>Add the code to your 404.php template page by including <code>&lt;?php if(function_exists(&#039;aa_google_404&#039;))aa_google_404();?&gt;</code> in your main content area.</li>
</ol>
<h2><a id="aaf"></a>Frequently Asked Questions</h2>
<p><strong>Do I need a Google Account?</strong></p>
<p>Yes.</p>
<p><strong>Do I need a 404.php template file?</strong></p>
<p>Only if you want to use this for your error page.</p>
<p><strong>My 404.php page isn&#8217;t being served for 404 Not Found errors!?</strong></p>
<p>Add <code>ErrorDocument 404 /index.php?error=404</code> to your .htaccess file.</p>
<p><strong>What is a Google API Key?</strong></p>
<p><a class="IFL" rel="lb" href='/wp-content/uploads/2007/09/aa-got-key.png' title='The Google Ajax API Key'><img src='/wp-content/uploads/2007/09/aa-got-key.thumbnail.png' alt='The Google Ajax API Key' /></a><br class="C" /></p>
<p><strong>How do I get a Google API Key?</strong></p>
<p><a class="IFL" rel="lb" href='/wp-content/uploads/2007/09/aa-get-key.png' title='Get Google API Key'><img src='/wp-content/uploads/2007/09/aa-get-key.thumbnail.png' alt='Get Google API Key' /></a><br class="C" /></p>
<h2><a id="aass"></a>Google 404 Screenshots</h2>
<p><span id="errorpage404" class="v601"><span class="load">Loading Video&#8230; <a href="http://f.askapache.com/mp4/">[dl]</a></span></span></p>
<p class="IFL"><strong>Plugin Configuration Panel</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-panel-preview1.png' title='AskApache Google 404 WordPress Plugin Configuration Panel'><img src='/wp-content/uploads/2007/09/aa-panel-preview1.thumbnail.png' alt='AskApache Google 404 WordPress Plugin Configuration Panel' /></a></p>
<p class="IFL"><strong>Search Entire Web</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-404-all-web.png' title='Search Entire Web with Google'><img src='/wp-content/uploads/2007/09/aa-404-all-web.thumbnail.png' alt='Search Entire Web with Google' /></a></p>
<p class="IFL"><strong>Search Blogs</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-404-blog-search.png' title='Search Blogs'><img src='/wp-content/uploads/2007/09/aa-404-blog-search.thumbnail.png' alt='Search Blogs' /></a></p>
<p class="IFL"><strong>Search Custom Search Engines</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-404-google-cse.png' title='Search Custom Search Engines'><img src='/wp-content/uploads/2007/09/aa-404-google-cse.thumbnail.png' alt='Search Custom Search Engines' /></a></p>
<p class="IFL"><strong>Search Images</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-404-image-search.png' title='Search Images'><img src='/wp-content/uploads/2007/09/aa-404-image-search.thumbnail.png' alt='Search Images' /></a></p>
<p class="IFL"><strong>Search Online Videos</strong><br /><a rel="lb" href='/wp-content/uploads/2007/09/aa-404-video-search.png' title='Search Online Videos'><img src='/wp-content/uploads/2007/09/aa-404-video-search.thumbnail.png' alt='Search Online Videos' /></a></p>
<hr />
<h2>More Info from Google</h2>
<ul>
<li><a href="http://code.google.com/apis/ajaxsearch/">AJAX Search API</a></li>
<li><a href="http://code.google.com/apis/ajaxsearch/wizards.html">AJAX Search Wizards</a></li>
<li><a href="http://code.google.com/apis/ajaxsearch/documentation/">Developer Guide</a></li>
<li><a href="http://code.google.com/apis/ajaxsearch/samples.html">Code Samples</a></li>
<li><a href="http://code.google.com/apis/ajaxsearch/community-samples.html">Community Samples</a></li>
<li><a href="http://code.google.com/support/bin/topic.py?topic=10021">Knowledge Base</a></li>
<li><a href="http://googleajaxsearchapi.blogspot.com/">AJAX APIs Blog</a></li>
<li><a href="http://groups.google.com/group/Google-AJAX-Search-API">Developer Forum</a></li>
</ul>
<p><a href="http://www.askapache.com/ajax/404-google-wordpress-plugin.html">SEO Boost from Google 404 Plugin</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/ajax/404-google-wordpress-plugin.html/feed/</wfw:commentRss>
		<slash:comments>112</slash:comments>
		</item>
		<item>
		<title>Adding Print Capability to your Site with CSS</title>
		<link>http://www.askapache.com/css/css-print-site-stylesheet.html</link>
		<comments>http://www.askapache.com/css/css-print-site-stylesheet.html#comments</comments>
		<pubDate>Tue, 01 Jul 2008 04:38:56 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[XHTML]]></category>
		<category><![CDATA[Accessibility]]></category>

		<guid isPermaLink="false">http://www.askapache.com/?p=1043</guid>
		<description><![CDATA[<p><a class="IFR hs hs36" rel="lb" href='/wp-content/uploads/2008/07/printer.jpg' title="css printer friendly website"></a>Its really nice to be able to print out a webpage you are reading using your browsers built-in print feature.  Using CSS you can easily transform your site into a print-friendly site.<br /><br />Today I received an email from a visitor to my site requesting that I add a way to <strong>print site articles</strong> on AskApache<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL hs hs36" rel="lb" href='/wp-content/uploads/2008/07/printer.jpg' title="css printer friendly website"></a>Its really nice to be able to print out a webpage you are reading using your browsers built-in print feature.  Using CSS you can easily transform your site into a print-friendly site.</p>
<p>Today I received an email from a visitor to my site requesting that I add a way to <strong>print site articles</strong> on AskApache<br class="C" /></p>
<blockquote><p>Finally, you have so much great stuff that I need to print it take it offline so I can consume it. However, your theme prints just awful with huge empty spaces between paragraphs and especially with some of your example code, i.e. see <a href="http://www.askapache.com/htaccess/htaccess-fresh.html">&#8220;Redirect All Feeds to Feedburner’s MyBrand&#8221;</a>.  Not sure if you care but it would really be great for those of us who print if you could clean it up for nicer printing to fully print your examples and to get rid of the excessive whitespace.</p>
</blockquote>
<p class="anote">Go ahead and hit print preview to see how effective this simple CSS print method is!</p>
<p class="anote">Updated! Now both the print and regular css are in the same file!  <a href="http://www.w3.org/TR/CSS21/page.html">Please read this</a>.</p>
<h2>Making AskApache Printer-Friendly</h2>
<p>The first thing I did was to create a blank style sheet named <a href="http://z.askapache.com/c/apacheprint-176.css">apacheprint.css</a> and then I added this XHTML to my <code>&lt;head&gt;&lt;/head&gt;</code></p>
<pre>
&lt;link href="http://z.askapache.com/c/apacheprint-176.css" rel="stylesheet" type="text/css" media="print" /&gt;
</pre>
<p>Amazingly, to make my site printer-friendly, all I had to do was edit the apacheprint.css file to control how browsers will print my site.</p>
<h2>Resetting the CSS</h2>
<p>Next I added the Yahoo Reset.css and Base.css files to my apacheprint.css file.  That code looks like this.</p>
<pre>
html {color:#000; background:#FFF;}
body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,code,form,fieldset,legend,input,textarea,p,blockquote,th,td {margin:0; padding:0;}
table {border-collapse:collapse; border-spacing:0;}
fieldset,img {border:0;}
address,caption,cite,code,dfn,em,strong,th,var {font-style:normal; font-weight:normal;}
li {list-style:none;}
caption,th {text-align:left;}
h1,h2,h3,h4,h5,h6 {font-size:100%; font-weight:normal;}
q:before,q:after {content:&#039;&#039;;}
abbr,acronym {border:0; font-variant:normal;}
sup {vertical-align:text-top;}
sub {vertical-align:text-bottom;}
input,textarea,select {font-family:inherit; font-size:inherit; font-weight:inherit;}
input,textarea,select {*font-size:100%;}
legend {color:#000;}
code {display:inline;text-indent:3px;}
h1 {font-size:138.5%;}
h2 {font-size:123.1%;}
h3 {font-size:108%;}
h1,h2,h3 {margin:1em 0;}
h1,h2,h3,h4,h5,h6,strong {font-weight:bold;}
abbr,acronym {border-bottom:1px dotted #000; cursor:help;}
em {font-style:italic;}
blockquote,ul,ol,dl {margin:1em;}
ol,ul,dl {margin-left:2em;}
ol li {list-style:decimal outside;}
ul li {list-style:disc outside;}
dl dd {margin-left:1em;}
th,td {border:1px solid #000; padding:.5em;}
th {font-weight:bold; text-align:center;}
caption {margin-bottom:.5em; text-align:center;}
p,fieldset,table,pre {margin-bottom:1em;}
input[type=text],input[type=password],textarea {width:12.25em; *width:11.9em;}
</pre>
<h2>Hiding Unfriendly Content</h2>
<p>Ok so I don&#8217;t want to display the sidebar, header, footer, and several other elements on this site, so I added them to apacheprint.css with the instruction to not display them.</p>
<pre>
#HeadW,#HeadW,
#NavM,#HeadW,
#FootW,#FootW,
#simg,#simg,
#BTNfs,#BTNfs,
#sidebar,#sidebar,
#content #pagebar,#pagebar,
#content #digg,#digg,
#content #bcomme,#bcomme,
#content #comments,#comments,
#content #related1p,#related1p,
#content .rnote,
.flef,.flef,
#content #npl,#npl {display:none !important;}
&nbsp;
#searchbox_002660089121042511758:kk7rwc2gx0i,#searchbox_002660089121042511758:kk7rwc2gx0i,
form#searchbox_002660089121042511758:kk7rwc2gx0i,form#searchbox_002660089121042511758:kk7rwc2gx0i,
#snaptalent,#snaptalent,
h2.HAC {display:none !important;}
</pre>
<h2>Misc CSS Fixes</h2>
<p>Once that was done I tested my site using the &#8220;print preview&#8221; browser feature, and found some other things I needed to fix.</p>
<pre>
#GlobalW,
#content,
#htaccess {width:auto !important; height:auto !important; overflow:visible !important; background:transparent !important; background-image:none !important; padding:0 !important; margin:0 !important; float:none !important;}
&nbsp;
.item {width:auto !important; height:100% !important; overflow:visible !important; float:none !important;}
.post-content {width:auto !important; height:auto !important; float:none !important;}
.item .post-content {width:90% !important;padding:0 6% 0 0 !important;max-width:100% !important;margin:0 auto !important;}
&nbsp;
.C {clear:both; padding:0; margin:0; line-height:5px; font-size:10px; border-bottom-width:0px;}
#content .post-content h2 {margin-top:1em;}
#content h1#sing {margin:0; width:100%; padding:0;}
.item {padding:0; margin:0;}
#content .commentlist li,#content .commentlist li.alt {margin:0.25em;}
</pre>
<h2>Correct Page Breaks and Width</h2>
<p>In order to print correctly, I also added the following.</p>
<pre>
html,body {background-color:#FFF; color:#000; font-size: 12pt;}
img  {max-width: 100%;}
h1,h2,h3,h4,h5,h6 {page-break-after: avoid;}
ul, ol, li {page-break-inside: avoid;}
table table,tr,td {page-break-before: avoid;page-break-after: avoid;}
</pre>
<h3>Making Comments Appear on Separate Page</h3>
<p>I created a class called .pb in my main css file</p>
<pre>
.pb { page-break-before: always; }
</pre>
<p>that creates a page break and then added that class to a hr element before my comment div.</p>
<pre>
&lt;hr class="pb" /&gt;
</pre>
<h2>Wrapping Code in PRE</h2>
<p>I use <code>
<pre>&lt;/code&gt; tags to markup code in my posts, but printing doesn&#039;t show you a scrollbar like my site does, so I added this fine CSS pre hack to wrap the lines when printing.&lt;/p&gt;
&lt;pre&gt;
pre {page-break-inside: avoid; font-size: 7pt !important; max-width:95% !important; overflow-x: auto; /* Use horizontal scroller if needed; for Firefox 2, not needed in Firefox 3 */ white-space: pre-wrap; /* css-3 */ white-space: -moz-pre-wrap !important; /* Mozilla, since 1999 */ white-space: -pre-wrap; /* Opera 4-6 */ white-space: -o-pre-wrap; /* Opera 7 */ /* width: 99%; */ word-wrap: break-word; /* Internet Explorer 5.5+ */}
</pre>
<h2>Displaying links for print</h2>
<p>I opted not to do this because I have way to many links in my posts, but here is how I can display the links next to the link name in p and li tags.  Note that it will not print relative links or anchor links or javascript links.</p>
<pre>
.item p a:link:after,
.item p a:visited:after,
.item li a:link:after,
.item li a:visited:after { content: " (" attr(href) ") ";}
.item p a[href^="/"]:after,
.item li a[href^="/"]:after,
.item p a[href^="#"]:after,
.item p a[href^="javascript"]:after,
.item li a[href^="#"]:after,
.item li a[href^="javascript"]:after,
.item p a[href^="http://www.askapache"]:after,
.item p a[href^="http://www.askapache"]:after,
.item li a[href^="http://www.askapache"]:after,
.item li a[href^="http://www.askapache"]:after {content: "";}
</pre>
<h2>Learn More about CSS Printing</h2>
<ol>
<li><a href="http://developer.yahoo.com/yui/reset/">Yahoo UI Library for Resetting CSS</a></li>
<li>A List Aparts: Going To Print</li>
<li><a href="http://www.longren.org/2006/09/27/wrapping-text-inside-pre-tags/">Wrapping Text Inside Pre Tags</a></li>
<li><a href="http://www.alistapart.com/articles/pocket/">A List Aparts: Taking Your Design to the Small Screen</a></li>
<li><a href="http://dev.opera.com/articles/view/making-small-devices-look-great/">Dev Operas: Making Small Devices Look Great</a></li>
<li><a href="http://css-tricks.com/css-tricks-finally-gets-a-print-stylesheet/">CSS-Tricks finally gets a Print Stylesheet</a></li>
<li><a href="http://davidwalsh.name/advanced-css-printing-css-page-breaks">Advanced CSS Printing: Using Page Breaks</a></li>
<li><a href="http://members.chello.nl/b.kroonspecker/opera/">Opera user stylesheets</a></li>
<li><a href="http://www.w3.org/TR/REC-CSS2/page.html">W3.org Paged Media</a></li>
</ol>
<p><a href="http://www.askapache.com/css/css-print-site-stylesheet.html">Adding Print Capability to your Site with CSS</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/css/css-print-site-stylesheet.html/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Come On and Sprite for your Website</title>
		<link>http://www.askapache.com/css/background-image.html</link>
		<comments>http://www.askapache.com/css/background-image.html#comments</comments>
		<pubDate>Wed, 16 Jan 2008 04:56:15 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Cache]]></category>
		<category><![CDATA[Featured]]></category>
		<category><![CDATA[Bandwidth]]></category>
		<category><![CDATA[Image Sprites]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://www.askapache.com/css/background-image.html</guid>
		<description><![CDATA[<p><a rel="lb" class="IFL" href='http://z.askapache.com/i/css-sprite.png' title='CSS Sprite, candid shot'><img src='/wp-content/uploads/2008/01/css-bg-sprite1.png' alt='CSS Sprite, candid shot' /></a>Let me show you an example that works so well I am using it right now on my site.  Every page in fact.  If you are a young or up and coming web developer with skills to pay the bills, lets make the future Net fast, learn about optimization and refactoring while you still have the chance.<br class="C" /></p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" rel="lb" href='/wp-content/uploads/2008/01/css-bg-sprite.png' title='CSS Image Sprite Example'><img src='/wp-content/uploads/2008/01/css-bg-sprite.thumbnail.png' alt='CSS Image Sprite Example' /></a><strong>Notice any familiar images from my website?</strong>  Real special huh?  Hah, maybe.. No, let&#8217;s not be silly, let&#8217;s get to it.  <em>Get ready to save some bandwidth</em></p>
<h2>CSS Sprites- What you say?</h2>
<p>Css sprites sound tough but <strong>they aren&#8217;t</strong>, not here, not in this article.  I want you to make one, I want a faster technorati, I want a faster hypem.com!  Just one.  Now your website visitors only have to download 1 image instead of 3-15!  I do that for you guys and girls, won&#8217;t you return the favor?</p>
<h2>Image Sprite before XHTML</h2>
<ul>
<li>Go to you site and pick out 3-15 images that are on almost every page.</li>
<li>Now create a new image with all of those images side by side, it will make things easier to have each image be at the very top, so they aren&#8217;t on top or above each other.</li>
<li>Then make the background white and save the file.</li>
</ul>
<p><strong>That&#8217;s it! Your own Image Sprite!</strong></p>
<p>Just a couple images pasted together in a photoshop file.  Now that we understand the simplicity of a sprite, lets focus on using one, and making that as easy as possible, none of that tricky CSS stuff that <em>I love</em>.<br class="C" /></p>
<h2>XHTML before CSS</h2>
<p>Ok before you have CSS, you have XHTML.  This is the XHTML that IS my askapache logo at the top left of this screen.  It is conveniently a link to my home page.  All you need to notice from this example is the <code>id="apache"</code>. That is how we can control that particular tag from within CSS.</p>
<pre>
&lt;a id="apache" href="http://www.askapache.com/" title="AskApache.com Logo"&gt;&lt;/a&gt;
</pre>
<h2>CSS and We&#8217;re spent</h2>
<p><a rel="lb" class="IFL" href='http://z.askapache.com/i/css-sprite.png' title='CSS Sprite, candid shot'><img src='/wp-content/uploads/2008/01/css-bg-sprite1.png' alt='CSS Sprite, candid shot' /></a>Whew, that was an exhausting couple minutes right?  Ok did you take a water break?  You ready go?  Lets do it.  Time to pay a little back to our Internet.</p>
<p>This css explains that the background-image to be displayed for the #apache link element is exactly 160&#215;27 pixels and is 81pixes in from the left of the image css-sprite.</p>
<pre>
#apache {width:160px; height:27px; background:url(http://z.askapache.com/i/css-sprite.png) -81px 0 no-repeat;
margin:0; padding:0; overflow:hidden;display:block; position:absolute; top:10px; left:10px; }
</pre>
<h2>Dancing the Sprite Dance</h2>
<p>Ok so that should get you started, or if that makes you happy enough you are good to go!</p>
<h3>Using CSS Sprites for image elements</h3>
<p>See now why I said it would be easier if you keep your images all aligned at the top?  This way you only have to figure out the distance from the left as well as the actual image dimensions. But as my sprite example shows, you don&#8217;t have to do it the easy way, but just coming this far you&#8217;ve accomplished more than you realize, and  probably gave you an advantage most of your competitors don&#8217;t have.  No doubt.  Congratulations.</p>
<p><strong>But</strong>, what if you are a stickler for semantically ideal coding guru and you don&#8217;t like using background-images on an a element without using an image element?  <em>First, chill :p</em></p>
<p>I experimented a little bit on this awhile ago, and discovered a simple but IMO very elegant solution.  To get it to work, use a 1&#215;1 transparent .gif image and set that as the source of your image, everything else discussed above will then work.</p>
<h3>Caveats</h3>
<p>Not many.  Because you should only use this for your most requested images that are more design elements than something like a photo of your dog.</p>
<ul>
<li>Use the overflow:hidden css to prevent overlapping.</li>
<li>For list elements like li, ul, dt, etc.. follow <a href="http://www.askapache.com/css/speedy-sites-with-image-sprites-and-css.html">this article</a> and <a href="http://z.askapache.com/i/sprite-icons.png">align the elements vertically</a>.</li>
<li><strong>Dont become a SNOB!</strong></li>
</ul>
<p><a href="http://www.askapache.com/css/background-image.html">Come On and Sprite for your Website</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/css/background-image.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>CSS Cross-Browser Compatibility Tip</title>
		<link>http://www.askapache.com/tools/css-browser-screenshots.html</link>
		<comments>http://www.askapache.com/tools/css-browser-screenshots.html#comments</comments>
		<pubDate>Thu, 13 Dec 2007 08:08:02 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Web Tools]]></category>

		<guid isPermaLink="false">http://www.askapache.com/tools/css-browser-screenshots.html</guid>
		<description><![CDATA[<p><a rel="iz" href="http://www.askapache.com/tools/css-browser-screenshots.html" title="AskApache.com ScreenShot - Epiphany 2.18" class="IZ20W160H429"><img id="iz20" class="IFL" style="width:80px;height:214px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-887edf28651df631d87d1ecc73fc9600.png" alt="Epiphany 2.18" /></a>What I used to do when I was still learning CSS was to check the web page in each of the various problematic browsers to make sure the display stayed the same.  I have several actual machines and several vmware virtual machines running various browers but I decided to skip all that extra time and effort and just use an online tool to do it for me.  The tool views my page in all the various browsers and generates a screenshot image from each browser so that I can see if there are issues with my CSS.</p>]]></description>
			<content:encoded><![CDATA[<p class="IFL" style="width:100px; height:214px;"><a rel="iz" href="http://z.askapache.com/i/screenshots/887edf28651df631d87d1ecc73fc9600.png" title="AskApache.com ScreenShot - Epiphany 2.18"><img id="iz1W160H429" class="preview" style="width:80px;height:214px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-887edf28651df631d87d1ecc73fc9600.png" alt="AskApache.com ScreenShot - Epiphany 2.18" /></a><br class="C" /></p>
<p>I&#8217;ve been trying to master <dfn title="Cascading Style Sheets">CSS</dfn> for a number of years, and rely on it heavily for every web design project I am involved in.  An issue that was more important in the past but still huge today is the difference between how the various browser rendering engines and DOM engines process CSS.  Basically, an WHTML Strict <em>(the only way I code)</em> web page can look dramatically different depending on which browser is viewing it.</p>
<p>Just last week I finished up an online <strong>Webinar Registration</strong> form for one of regular clients, and proceeded to send an invitation to register out to hundreds of qualified leads.  I received feedback from a couple of the leads using the registration form that they were having problems seeing the submission button/image to complete the registration.  I instantly realized that the problem could only be occuring because of CSS issues.  These particular leads were using old versions of Apples&#8217; Safari web browser and even a version of Internet Explorer dating from the stone-age.  The problem was how floated elements, cleared elements, and block level vs. inline elements are displayed in those browsers.  The fix was very simple and only took me a minute or 2, but it highlighted that I have become a little to confident in my CSS cross-browser-compatibility skills.</p>
<p>What I used to do when I was still learning CSS was to check the web page in each of the various problematic browsers to make sure the display stayed the same.  I have several actual machines and several vmware virtual machines running various browers but I decided to skip all that extra time and effort and just use an online tool to do it for me.  The tool views my page in all the various browsers and generates a screenshot image from each browser so that I can see if there are issues with my CSS.</p>
<h2><a href="http://browsershots.org/http://www.askapache.com/">Browsershots</a></h2>
<blockquote cite="http://browsershots.com">
<p>Browsershots makes screenshots of your web design in different browsers. It is a free open-source online service created by Johann C. Rocholl. When you submit your web address, it will be added to the job queue. A number of distributed computers will open your website in their browser. Then they will make screenshots and upload them to the central server here. </p>
</blockquote>
<p class="anote">Below are the actual screenshots generated from Browsershots, and so this tool is incredibly helpful in verifying my sites as cross-browser compatible.</p>
<div class="previews">
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/59d75c9ad351625603c4a8b82f39c3b8.png" title="AskApache.com ScreenShot - Safari 3.0.3"><img id="iz2W160H339" class="preview" style="width:80px;height:169px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-59d75c9ad351625603c4a8b82f39c3b8.png" alt="AskApache.com ScreenShot - Safari 3.0.3" /></a></p>
<p class="caption" style="padding-top:169px">Safari 3.0.3<br />Windows 2000</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/3dfbd2bac4218bcf63afdf555efbd90a.png" title="AskApache.com ScreenShot - Opera 9.24"><img id="iz3W160H339" class="preview" style="width:80px;height:169px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-3dfbd2bac4218bcf63afdf555efbd90a.png" alt="AskApache.com ScreenShot - Opera 9.24" /></a></p>
<p class="caption" style="padding-top:169px">Opera 9.24<br />Windows 2000</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/4d7a045eb9b65a3db5e5468d22e8436f.png" title="AskApache.com ScreenShot - Firefox 2.0.0.9"><img id="iz4H160X343"><img id="iz1" class="preview" style="width:80px;height:214px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-887edf28651df631d87d1ecc73fc9600.png" alt="AskApache.com ScreenShot - Epiphany 2.18" /></a></p>
<p class="caption" style="padding-top:171px">Firefox 2.0.0.9<br />Windows 2000</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/fefabdb5e785c8d7d336f02ba44a9e1d.png" title="AskApache.com ScreenShot - Konqueror 3.5"><img id="iz5W160H426" class="preview" style="width:80px;height:213px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-fefabdb5e785c8d7d336f02ba44a9e1d.png" alt="AskApache.com ScreenShot - Konqueror 3.5" /></a></p>
<p class="caption" style="padding-top:213px">Konqueror 3.5<br />Ubuntu 6.06</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/90c428064deea40e357008ca993c122b.png" title="AskApache.com ScreenShot - Firefox 1.5.0.13"><img id="iz6W160H304" class="preview" style="width:80px;height:152px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-90c428064deea40e357008ca993c122b.png" alt="AskApache.com ScreenShot - Firefox 1.5.0.13" /></a></p>
<p class="caption" style="padding-top:152px">Firefox 1.5.0.13<br />Ubuntu 6.06</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/42079ea80adf203a6473677e561ed1ee.png" title="AskApache.com ScreenShot - Opera 9.24"><img id="iz7W160H428" class="preview" style="width:80px;height:214px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-42079ea80adf203a6473677e561ed1ee.png" alt="AskApache.com ScreenShot - Opera 9.24" /></a></p>
<p class="caption" style="padding-top:214px">Opera 9.24<br />Ubuntu 6.06</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/5207deed2f26b8596b6d39417dc34755.png" title="AskApache.com ScreenShot - MSIE 7.0"><img id="iz8W160H443" class="preview" style="width:80px;height:221px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-5207deed2f26b8596b6d39417dc34755.png" alt="AskApache.com ScreenShot - MSIE 7.0" /></a></p>
<p class="caption" style="padding-top:222px">MSIE 7.0<br />Windows 2003</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/5bfa8b38448de10da470c2934b3999ce.png" title="AskApache.com ScreenShot - MSIE 6.0"><img id="iz9W160H375" class="preview" style="width:80px;height:187px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-5bfa8b38448de10da470c2934b3999ce.png" alt="AskApache.com ScreenShot - MSIE 6.0" /></a></p>
<p class="caption" style="padding-top:188px">MSIE 6.0<br />Windows XP</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/d7e64509891f5083b4dae3f3599027db.png" title="AskApache.com ScreenShot - Firefox 1.5"><img id="iz10W160H366" class="preview" style="width:80px;height:183px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-d7e64509891f5083b4dae3f3599027db.png" alt="AskApache.com ScreenShot - Firefox 1.5" /></a></p>
<p class="caption" style="padding-top:183px">Firefox 1.5<br />Windows XP</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/d9fdd7b4a886acc30391d025c37e28b6.png" title="AskApache.com ScreenShot - Opera 9.50"><img id="iz11W160H120" class="preview" style="width:80px;height:60px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-d9fdd7b4a886acc30391d025c37e28b6.png" alt="AskApache.com ScreenShot - Opera 9.50" /></a></p>
<p class="caption" style="padding-top:60px">Opera 9.50<br />Ubuntu 7.10</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/75b0e208b5bf12fdc25f2155c6c177f6.png" title="AskApache.com ScreenShot - Firefox 2.0.0.11"><img id="iz12W160H182" class="preview" style="width:80px;height:91px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-75b0e208b5bf12fdc25f2155c6c177f6.png" alt="AskApache.com ScreenShot - Firefox 2.0.0.11" /></a></p>
<p class="caption" style="padding-top:91px">Firefox 2.0.0.11<br />Ubuntu 7.10</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/bf5518c1a5f089de932973bdbafb8eda.png" title="AskApache.com ScreenShot - MSIE 5.5"><img id="iz13W160H369" class="preview" style="width:80px;height:184px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-bf5518c1a5f089de932973bdbafb8eda.png" alt="AskApache.com ScreenShot - MSIE 5.5" /></a></p>
<p class="caption" style="padding-top:185px">MSIE 5.5<br />Windows 2000</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/de5e271fb99eb8151847c7419a5d0b45.png" title="AskApache.com ScreenShot - Safari 1.3.2"><img id="iz14W160H459" class="preview" style="width:80px;height:229px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-de5e271fb99eb8151847c7419a5d0b45.png" alt="AskApache.com ScreenShot - Safari 1.3.2" /></a></p>
<p class="caption" style="padding-top:230px">Safari 1.3.2<br />Mac OS X 10.3</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/35931d6e5f2252b4bf528015e51ce794.png" title="AskApache.com ScreenShot - Safari 3.0.4"><img id="iz15W160H476" class="preview" style="width:80px;height:238px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-35931d6e5f2252b4bf528015e51ce794.png" alt="AskApache.com ScreenShot - Safari 3.0.4" /></a></p>
<p class="caption" style="padding-top:238px">Safari 3.0.4<br />Mac OS X 10.4</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/f399b1c394ce837ba2124ca5568d5c53.png" title="AskApache.com ScreenShot - Safari 2.0.4"><img id="iz16W160H477" class="preview" style="width:80px;height:238px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-f399b1c394ce837ba2124ca5568d5c53.png" alt="AskApache.com ScreenShot - Safari 2.0.4" /></a></p>
<p class="caption" style="padding-top:238px">Safari 2.0.4<br />Mac OS X 10.4</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/2ea619b388a7c223ac759b559729b628.png" title="AskApache.com ScreenShot - Firefox 2.0.0.1"><img id="iz17W160H337" class="preview" style="width:80px;height:168px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-2ea619b388a7c223ac759b559729b628.png" alt="AskApache.com ScreenShot - Firefox 2.0.0.1" /></a></p>
<p class="caption" style="padding-top:168px">Firefox 2.0.0.1<br />Mac OS X 10.4</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/61e561d14653f8c963ad051f7e7d9011.png" title="AskApache.com ScreenShot - NetFront 3.2"><img id="iz18W160H349" class="preview" style="width:80px;height:174px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-61e561d14653f8c963ad051f7e7d9011.png" alt="AskApache.com ScreenShot - NetFront 3.2" /></a></p>
<p class="caption" style="padding-top:175px">NetFront 3.2<br />Ubuntu 7.10</p>
</p></div>
<div class="preview" style="width:80px;height:258px;float:left;">
<p><a rel="iz" href="http://z.askapache.com/i/screenshots/887edf28651df631d87d1ecc73fc9600.png" title="AskApache.com ScreenShot - Epiphany 2.18"><img id="iz19W160H429" class="preview" style="width:80px;height:214px;z-index:0" src="http://z.askapache.com/i/screenshots/sm-887edf28651df631d87d1ecc73fc9600.png" alt="AskApache.com ScreenShot - Epiphany 2.18" /></a></p>
<p class="caption" style="padding-top:215px">Epiphany 2.18<br />Ubuntu 7.04</p>
</p></div>
<p>	<br class="C" />
</div>
<p><a href="http://www.askapache.com/tools/css-browser-screenshots.html">CSS Cross-Browser Compatibility Tip</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/tools/css-browser-screenshots.html/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Best CSS .Classes for CSS Toolbox</title>
		<link>http://www.askapache.com/css/css-class-example.html</link>
		<comments>http://www.askapache.com/css/css-class-example.html#comments</comments>
		<pubDate>Wed, 28 Nov 2007 21:57:41 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.askapache.com/css/css-class-example.html</guid>
		<description><![CDATA[<p><a class="IFL" href='http://www.askapache.com/css/css-class-example.html' title='CSS Classes Toolbox .class'><img src='/wp-content/uploads/2007/10/toolbox-css-office.thumbnail.jpg' alt='CSS Classes Toolbox .class' /></a>CSS is one of the most useful tools I have in my toolbox as a Web Developer.  Having a CSS Toolbox containing good CSS Classes that you repeatedly use is quite helpful for us XHTML / web-standards / best-practices developers.  Check out 10 of my favorite CSS classes.</p>]]></description>
			<content:encoded><![CDATA[<p><img class="IFL" src='/wp-content/uploads/2007/10/toolbox-css-office.thumbnail.jpg' alt='CSS Classes Toolbox .class' />As a Professional Web Developer and Designer, CSS is by far one of the most useful tools I use.  Moving from one web site to the next is made easier by having a CSS Toolbox containing some default CSS Classes that you use over and over again.  Here are 10 of my favorite CSS Classes.<br class="C" /></p>
<p class="anote">What are Your favorite CSS Classes?  Please share your tips!</p>
<h2>Universal CSS .Classes</h2>
<p>Most of these are what I like to think of as &#8220;actionable&#8221; classes, IOW, they aren&#8217;t just color classes or font-size classes.</p>
<ol>
<li><code>.S {display:block; visibility:visible;}</code> &#8211; Shows the element.</li>
<li><code>.H {display:none; visibility:hidden;}</code> &#8211; Hides the element.</li>
<li><code>.VV {visibility:visible;}</code> &#8211; Makes the element visible.</li>
<li><code>.VH {visibility:hidden;}</code> &#8211; Hides an element but still takes up space, not fullly hidden like <code>.H</code></li>
<li><code>.FR {float:right;}</code> &#8211; Floats the element to the right.</li>
<li><code>.FL {float:left;}</code> &#8211; Floats the element to the left.</li>
<li><code>.DI {display:inline;}</code> &#8211; Changes the display type to &#8220;inline&#8221;.</li>
<li><code>.DB {display:block;}</code> &#8211; Makes the element a block-level element.</li>
<li><code>.C {clear:both; padding:0; margin:0; line-height:2em; font-size:10px; border-bottom:1px solid #FFF;}</code> &#8211; Clears floated elements.</li>
<li><code>.CENT {margin:0 auto;}</code> &#8211; Makes block element centred.</li>
</ol>
<p class="anote">Please note that these classes are meant only to show what can be done with CSS, I wrote this post for CSS guru&#8217;s and up and coming gurus.  Sometimes I assume everyone reading my blog know as much as I do about what I&#8217;m writing about, so I skip almost all explanation and skip to the code.  Basically stick to the W3C&#8217;s recommendations and try not to use classes inline unless its for something specific.  Most of these classes are very useful for use in javascript as well using the <code>element.className=&#039;S&#039;</code> method.</p>
<h2>Universal CSS Classes Example</h2>
<pre>
&lt;br class="C" /&gt; - clears any block level element.
&lt;hr class="C VH" /&gt; - Its still a block-level element, so it correctly clears floated elements and is a semantic page separator.
&lt;img class="FR" src="/1.gif" alt="" /&gt; - this image will float to the right.
&lt;p class="CENT"&gt; - the p is centred (if width isn&#039;t 100%;).
</pre>
<p class="enote">Think you are such a CSS/semantics guru that using classes is below you?  <strong>Ridiculous!</strong>  Classes are extremely helpful when used properly and not in excess.  Surely you don&#8217;t think you know more than <a href="http://meyerweb.com/eric/css/">Eric Meyer</a> or the <a href="http://www.w3.org/">W3C</a>&#8230; please view their source code, and try to loosen up while your at it ;)</p>
<p><a href="http://www.askapache.com/css/css-class-example.html">Best CSS .Classes for CSS Toolbox</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/css/css-class-example.html/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>Review: Posh CSS</title>
		<link>http://www.askapache.com/css/posh-css.html</link>
		<comments>http://www.askapache.com/css/posh-css.html#comments</comments>
		<pubDate>Wed, 28 Nov 2007 20:41:45 +0000</pubDate>
		<dc:creator>AskApache</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Review]]></category>

		<guid isPermaLink="false">http://www.askapache.com/css/posh-css.html</guid>
		<description><![CDATA[<p>PoshCSS.com has links to nice and new CSS Articles.  Don't worry, they aren't snobs. ;)</p>]]></description>
			<content:encoded><![CDATA[<p><a class="IFL" href='http://poshcss.com/' title='Posh CSS is Cascading Style Sheet Articles, Tutorials, Tips and Code for the modern day web designer'><img src='/wp-content/uploads/2007/11/posh-css-logo.png' alt='PoshCss.com logo' /></a>PoshCSS.com is a site by Massive Blue that has links to some really nice CSS Articles.  I recommend subscribing to their RSS Feed so you don&#8217;t miss any.</p>
<h2>Posh CSS</h2>
<blockquote><p>Posh CSS is the brainchild of <a href="http://sam.brown.tc/">Sam Brown</a> from <a href="http://www.massiveblue.com/">Massive Blue</a> who was looking for one central place to read about the latest and greatest techniques, tips and tutorials in the Cascading Style Sheet world. None existed and thus, Posh CSS was born.</p></blockquote>
<h3>Posh CSS Articles</h3>
<ul>
<li><a href="http://poshcss.com/2007/11/29/clean-css">Clean CSS optimizer and formatter</a></li>
<li><a href="http://poshcss.com/2007/11/28/coding-efficient-style-sheets">Coding Efficient Style Sheets</a></li>
<li><a href="http://poshcss.com/2007/11/26/the-css-media-types">The CSS media types</a></li>
<li><a href="http://poshcss.com/2007/11/27/css-drop-down-menu">CSS Drop Down Menu</a></li>
<li><a href="http://poshcss.com/2007/11/28/wufoos-free-css-form-designs">Wufoo&#8217;s Free CSS Form Designs</a></li>
<li><a href="http://poshcss.com/2007/11/26/simple-css-blockquotes-and-pullquotes">Simple CSS Blockquotes and Pullquotes</a></li>
<li><a href="http://poshcss.com/2007/11/29/best-css-classes-for-css-toolbox">Best CSS .Classes for CSS Toolbox</a></li>
</ul>
<p><img src='/wp-content/uploads/2007/11/posh-css.png' alt='PoshCss.com Screenshot' /></p>
<p><a href="http://www.askapache.com/css/posh-css.html">Review: Posh CSS</a> originally appeared on AskApache.</p>]]></content:encoded>
			<wfw:commentRss>http://www.askapache.com/css/posh-css.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
