<?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>dan.thoughts &#187; url controller</title>
	<atom:link href="http://blog.sosedoff.com/tag/url-controller/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.sosedoff.com</link>
	<description>Web-development, PHP, Ruby, Sinatra, Merb, Rails, MySQL, SQLite, Web Services.</description>
	<lastBuildDate>Wed, 25 Jan 2012 18:54:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Making URL controller easy</title>
		<link>http://blog.sosedoff.com/2009/01/15/making-url-controller-easy/</link>
		<comments>http://blog.sosedoff.com/2009/01/15/making-url-controller-easy/#comments</comments>
		<pubDate>Thu, 15 Jan 2009 10:27:08 +0000</pubDate>
		<dc:creator>Dan Sosedoff</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Nginx]]></category>
		<category><![CDATA[rewrite rules]]></category>
		<category><![CDATA[url controller]]></category>

		<guid isPermaLink="false">http://blog.sosedoff.com/?p=10</guid>
		<description><![CDATA[For example, instead of using &#8220;dirty&#8221; url`s in your web application (like test.php?param=1&#38;val=342&#38;fuck=bla) you can use very nice links (/this/is/nice/link/). And also, redirect all the requests to single file.
nginx configuration:

location / {
    root /var/site/public_html;
    index index.php index.html index.htm;
    if (!-e $request_filename) {
     [...]]]></description>
			<content:encoded><![CDATA[<p>For example, instead of using &#8220;dirty&#8221; url`s in your web application (like test.php?param=1&amp;val=342&amp;fuck=bla) you can use very nice links (/this/is/nice/link/). And also, redirect all the requests to single file.</p>
<p><strong>nginx configuration:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">location / {
    root /var/site/public_html;
    index index.php index.html index.htm;
    if (!-e $request_filename) {
        rewrite ^/(.*)/$ /index.php?path=$request_uri last;
    }
}</pre></div></div>

<p><strong>The same for Apache 2:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="apache" style="font-family:monospace;"><span style="color: #00007f;">RewriteEngine</span> <span style="color: #0000ff;">On</span>
<span style="color: #00007f;">RewriteBase</span> /
<span style="color: #00007f;">RewriteCond</span> %{REQUEST_FILENAME} !-d
<span style="color: #00007f;">RewriteRule</span> ^(.*)/$ index.php?path=%{REQUEST_URI} [NCL]</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.sosedoff.com/2009/01/15/making-url-controller-easy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>

