<?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>overfrown</title>
	<atom:link href="http://www.overfrown.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.overfrown.com</link>
	<description>LAMP, PHP, Postgres, MySQL, Perl, CSS, jQuery, CentOS, Ubuntu, Debian, RedHat</description>
	<lastBuildDate>Tue, 20 Oct 2009 03:29:42 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>How to: Use ModRewrite in .htaccess to include search engine friendly keywords in URLs</title>
		<link>http://www.overfrown.com/2009/10/how-to-use-modrewrite-in-htaccess-to-include-search-engine-friendly-keywords-in-urls/</link>
		<comments>http://www.overfrown.com/2009/10/how-to-use-modrewrite-in-htaccess-to-include-search-engine-friendly-keywords-in-urls/#comments</comments>
		<pubDate>Tue, 20 Oct 2009 02:48:28 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>

		<guid isPermaLink="false">http://www.overfrown.com/?p=28</guid>
		<description><![CDATA[Most CMS&#8217;s offer permalinks in the form of keywords within the URL. Using ModRewrite you can easily accomplish this.
First verify ModRewrite is enabled in Apache. 
Create a test folder within your web root path and then create a file named .htaccess in your new folder containing this text:

RewriteEngine On

Now visit yourdomain.com/testfolder. If you get a [...]]]></description>
			<content:encoded><![CDATA[<p>Most CMS&#8217;s offer permalinks in the form of keywords within the URL. Using ModRewrite you can easily accomplish this.</p>
<p><strong>First verify ModRewrite is enabled in Apache. </strong><strong><img title="apache" src="http://tuxtraining.com/wp-content/plugins/wp-post-icon/img/apache.gif" alt="" width="48" height="48" align="middle" /></strong></p>
<p>Create a test folder within your web root path and then create a file named .htaccess in your new folder containing this text:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteEngine On</pre></div></div>

<p>Now visit yourdomain.com/testfolder. If you get a 500 / Internal Server Error then you need to enable ModRewrite in Apache.</p>
<p>Once the page is loading without a 500 error, we can continue.</p>
<p>I&#8217;m going to show you how to turn an ugly URL like:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">http://www.yourdomain.com/index.php?pageid=49382</pre></div></div>

<p>to</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">http://www.yourdomain.com/pages/jewelry-and-watches/49382</pre></div></div>

<p><strong>First, let&#8217;s open .htaccess back up and add the following line:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">RewriteRule ^([^/]+)/([0-9]+)[/]?$ index.php?keywords=$1&amp;id=$2</pre></div></div>

<p>Just to explain, the line above is rewriting any requests like:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">/testfolder/these-are-my-keywords/123</pre></div></div>

<p>to</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">index.php?keywords=these-are-my-keywords&amp;id=123</pre></div></div>

<p>Remember it&#8217;s not REDIRECTING, it&#8217;s REWRITING. This happens blindly to the user/spiders, so it can add true value to your web structures.</p>
<p><strong>Next create a file named index.php in the same test folder with the following contents:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
  <span style="color: #666666; font-style: italic;">//dump out $_GET variables</span>
  <span style="color: #990000;">print_r</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_GET</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>You can now visit the page in your browser to see it in action.  </p>
<p>Example URL:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">http://www.yourdomain.com/testfolder/the-keywords-you-want/12345</pre></div></div>

<p>You should get output from index.php like:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">Array ( [keywords] =&gt; the-keywords-you-want [id] =&gt; 12345 )</pre></div></div>

<p>I have posted a PHP function that will <a href="http://www.overfrown.com/2009/09/title-keywordize-function/">keywordize a page title or description</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overfrown.com/2009/10/how-to-use-modrewrite-in-htaccess-to-include-search-engine-friendly-keywords-in-urls/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>How To: Install ffmpeg on CentOS or Redhat using up2date or yum</title>
		<link>http://www.overfrown.com/2009/09/how-to-install-ffmpeg-on-centos-or-redhat-using-up2date-or-yum/</link>
		<comments>http://www.overfrown.com/2009/09/how-to-install-ffmpeg-on-centos-or-redhat-using-up2date-or-yum/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 18:02:37 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.overfrown.com/?p=10</guid>
		<description><![CDATA[Easy instructions for installing ffmpeg on CentOS or Redhat using up2date or yum.]]></description>
			<content:encoded><![CDATA[<p>There are a bunch of instructions out there for installing ffmpeg. I found really easy instructions using yum, but I needed to use up2date. So I figured I would compile my steps.</p>
<p>First, make sure you&#8217;re logged in as root:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #c20cb9; font-weight: bold;">su</span> -</pre></div></div>

<p><strong>Install with up2date:</strong></p>
<p>1. Add the following line to <em>/etc/sysconfig/rhn/sources</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">yum dag http:<span style="color: #000000; font-weight: bold;">//</span>apt.sw.be<span style="color: #000000; font-weight: bold;">/</span>redhat<span style="color: #000000; font-weight: bold;">/</span>el4<span style="color: #000000; font-weight: bold;">/</span>en<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$ARCH</span><span style="color: #000000; font-weight: bold;">/</span>dag</pre></div></div>

<p><em>Note: Your source line may be different depending on your release. You can find the correct line to use here: <a href="http://dag.wieers.com/rpm/FAQ.php#B5" target="_blank">http://dag.wieers.com/rpm/FAQ.php#B5</a></em></p>
<p>2. Add the following line to <em>/etc/ld.so.conf</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib</pre></div></div>

<p>3. Finally, execute each of the following in order:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldconfig <span style="color: #660033;">-v</span>
rpm <span style="color: #660033;">-Uvh</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>rpmfind.net<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>dag<span style="color: #000000; font-weight: bold;">/</span>redhat<span style="color: #000000; font-weight: bold;">/</span>el4<span style="color: #000000; font-weight: bold;">/</span>en<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>dag<span style="color: #000000; font-weight: bold;">/</span>RPMS<span style="color: #000000; font-weight: bold;">/</span>rpmforge-release-0.3.6-1.el4.rf.i386.rpm
up2date <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> ffmpeg-devel</pre></div></div>

<p><em>Note: Your rpm may be different depending on your release. You can find the correct rpm to use here: <a href="http://www.rpmfind.net/linux/rpm2html/search.php?query=rpmforge-release" target="_blank">http://www.rpmfind.net/linux/rpm2html/search.php?query=rpmforge-release</a></em></p>
<p><strong>- Or &#8211; Install with yum:</strong></p>
<p>1. Create and add the following to <em>/etc/yum.repos.d/dag.repo</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #7a0874; font-weight: bold;">&#91;</span>dag<span style="color: #7a0874; font-weight: bold;">&#93;</span>
<span style="color: #007800;">name</span>=Dag RPM Repository <span style="color: #000000; font-weight: bold;">for</span> Red Hat Enterprise Linux
<span style="color: #007800;">baseurl</span>=http:<span style="color: #000000; font-weight: bold;">//</span>apt.sw.be<span style="color: #000000; font-weight: bold;">/</span>redhat<span style="color: #000000; font-weight: bold;">/</span>el<span style="color: #007800;">$releasever</span><span style="color: #000000; font-weight: bold;">/</span>en<span style="color: #000000; font-weight: bold;">/</span><span style="color: #007800;">$basearch</span><span style="color: #000000; font-weight: bold;">/</span>dag
<span style="color: #007800;">gpgcheck</span>=<span style="color: #000000;">1</span>
<span style="color: #007800;">enabled</span>=<span style="color: #000000;">1</span></pre></div></div>

<p>2. Add the following line to <em>/etc/ld.so.conf</em>:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">/</span>usr<span style="color: #000000; font-weight: bold;">/</span>local<span style="color: #000000; font-weight: bold;">/</span>lib</pre></div></div>

<p>3. Finally, execute each of the following in order:</p>

<div class="wp_syntax"><div class="code"><pre class="bash" style="font-family:monospace;">ldconfig <span style="color: #660033;">-v</span>
rpm <span style="color: #660033;">-Uvh</span> <span style="color: #c20cb9; font-weight: bold;">ftp</span>:<span style="color: #000000; font-weight: bold;">//</span>rpmfind.net<span style="color: #000000; font-weight: bold;">/</span>linux<span style="color: #000000; font-weight: bold;">/</span>dag<span style="color: #000000; font-weight: bold;">/</span>redhat<span style="color: #000000; font-weight: bold;">/</span>el4<span style="color: #000000; font-weight: bold;">/</span>en<span style="color: #000000; font-weight: bold;">/</span>i386<span style="color: #000000; font-weight: bold;">/</span>dag<span style="color: #000000; font-weight: bold;">/</span>RPMS<span style="color: #000000; font-weight: bold;">/</span>rpmforge-release-0.3.6-1.el4.rf.i386.rpm
yum update
yum <span style="color: #c20cb9; font-weight: bold;">install</span> <span style="color: #c20cb9; font-weight: bold;">ffmpeg</span> ffmpeg-devel</pre></div></div>

<p><em>Note: Your rpm may be different depending on your release You can find the correct rpm to use here: <a href="http://www.rpmfind.net/linux/rpm2html/search.php?query=rpmforge-release" target="_blank">http://www.rpmfind.net/linux/rpm2html/search.php?query=rpmforge-release</a></em></p>
<p><strong>You&#8217;re finished!</strong> You can find the PHP extension here: <a href="http://ffmpeg-php.sourceforge.net" target="_blank">http://ffmpeg-php.sourceforge.net</a></p>
<p>I found the original yum instructions here: <a href="http://www.crucialp.com/resources/tutorials/server-administration/how-to-install-ffmpeg-centos-rhel-redhat-enterprise-easy-way.php">http://www.crucialp.com/resources/tutorials/server-administration/how-to-install-ffmpeg-centos-rhel-redhat-enterprise-easy-way.php</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.overfrown.com/2009/09/how-to-install-ffmpeg-on-centos-or-redhat-using-up2date-or-yum/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Title &#8220;keywordize&#8221; function</title>
		<link>http://www.overfrown.com/2009/09/title-keywordize-function/</link>
		<comments>http://www.overfrown.com/2009/09/title-keywordize-function/#comments</comments>
		<pubDate>Sat, 12 Sep 2009 03:33:18 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[PHP]]></category>

		<guid isPermaLink="false">http://www.overfrown.com/?p=3</guid>
		<description><![CDATA[This function is used to fetch a valid keyword string for use in a URL. This function comes in handy when you want to structure your URLs to contain keywords found in the page&#8217;s title, for example.
Any non alphanumeric characters are stripped from the string, and spaces are replaced with dashes. Extra whitespace is accounted [...]]]></description>
			<content:encoded><![CDATA[<p>This function is used to fetch a valid keyword string for use in a URL. This function comes in handy when you want to structure your URLs to contain keywords found in the page&#8217;s title, for example.</p>
<p>Any non alphanumeric characters are stripped from the string, and spaces are replaced with dashes. Extra whitespace is accounted for.</p>
<p>Example:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$title</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'This is the &quot;Best&quot; Function Ever!'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> keywordize<span style="color: #009900;">&#40;</span><span style="color: #000088;">$title</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Output:</p>
<blockquote><p>this-is-the-best-function-ever</p></blockquote>
<p>Code:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">  <span style="color: #000000; font-weight: bold;">function</span> keywordize<span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
    <span style="color: #b1b100;">return</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/^[^a-z0-9]|[^a-z0-9]+$/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/ +|(\.{2,}[ ]?)+/s'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/[^a-z0-9_-]/s'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/(-{2,})/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'/((^-)|(-$))/'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'-'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'-'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">,</span> <span style="color: #990000;">strtolower</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$string</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span></pre></div></div>

<p>You can use the output of this function in your URLs like most CMS applications do to make your URLs search engine friendly.</p>
<p>You can add weight to the keywords within you page by containing them within the page&#8217;s URL.</p>
<p>I&#8217;ve written a short tutorial on <a href="http://www.overfrown.com/2009/10/how-to-use-modrewrite-in-htaccess-to-include-search-engine-friendly-keywords-in-urls/">adding search engine friendly keywords to a URL with ModRewrite</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.overfrown.com/2009/09/title-keywordize-function/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
