<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Pure-Essence.Net &#187; pretty_url</title>
	<atom:link href="http://pure-essence.net/tag/pretty_url/feed/" rel="self" type="application/rss+xml" />
	<link>http://pure-essence.net</link>
	<description>You have to visit this geeky girl&#039;s blog.</description>
	<lastBuildDate>Thu, 05 Jan 2012 07:43:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='pure-essence.net' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Pure-Essence.Net &#187; pretty_url</title>
		<link>http://pure-essence.net</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://pure-essence.net/osd.xml" title="Pure-Essence.Net" />
	<atom:link rel='hub' href='http://pure-essence.net/?pushpress=hub'/>
		<item>
		<title>Simple PHP URL rewrite</title>
		<link>http://pure-essence.net/2007/06/29/simple-php-path-rewrite/</link>
		<comments>http://pure-essence.net/2007/06/29/simple-php-path-rewrite/#comments</comments>
		<pubDate>Fri, 29 Jun 2007 21:14:02 +0000</pubDate>
		<dc:creator>pureessence</dc:creator>
				<category><![CDATA[geeky]]></category>
		<category><![CDATA[php code]]></category>
		<category><![CDATA[htaccess_rewrite]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[pretty_url]]></category>

		<guid isPermaLink="false">http://regretless.com/2007/06/29/simple-php-path-rewrite/</guid>
		<description><![CDATA[One thing I did for dmb is making dodosmb.com/profile/username work with my profile.php script. Normally without the help of .htaccess, you can use the value of the path info from the global variable For example, create a php file named profile.php and in there put: Then upload the file and load it with yourServerPath/profile.php/dodo. The [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=1174&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>One thing I did for <a href="http://dodosmb.com/">dmb</a> is making dodosmb.com/profile/username work with my profile.php script. Normally without the help of .htaccess, you can use the value of the path info from the global variable<br />
<pre class="brush: plain; wrap-lines: false;">
$_SERVER['PATH_INFO']
</pre></p>
<p>For example, create a php file named profile.php and in there put:<br />
<pre class="brush: plain; wrap-lines: false;">
&lt;?php echo $_SERVER['PATH_INFO']; ?&gt;
</pre></p>
<p>Then upload the file and load it with yourServerPath/profile.php/dodo. The script will print out<br />
<pre class="brush: plain; wrap-lines: false;">
/dodo
</pre></p>
<p>In my profile.php, I get the user by doing a simple sub string command like:<br />
<pre class="brush: plain; wrap-lines: false;">
$user = substr($_SERVER['PATH_INFO'], 1); // this will get rid of the leading slash
</pre></p>
<p>This allows me to feed users to my profile.php by using the url dodosmb.com/profile.php/username</p>
<p>That&#8217;s still not pretty enough; it&#8217;s better if I can do dodosmb.com/profile/username. This is where .htaccess rewrite comes in. <a href="http://www.yourhtmlsource.com/sitemanagement/urlrewriting.html">Here&#8217;s a great tutorial for .htaccess rewrite rules</a>. To accomplish my goal, I used the following rewrite rules in my .htaccess:<br />
<pre class="brush: plain; wrap-lines: false;">
RewriteEngine on
RewriteRule ^profile/([A-Za-z0-9]+)/$ /profile.php/$1
RewriteRule ^profile/([A-Za-z0-9]+)$ /profile.php/$1
</pre></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/pe20110517.wordpress.com/1174/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/pe20110517.wordpress.com/1174/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/pe20110517.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/pe20110517.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/pe20110517.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/pe20110517.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/pe20110517.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/pe20110517.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/pe20110517.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/pe20110517.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/pe20110517.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/pe20110517.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/pe20110517.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/pe20110517.wordpress.com/1174/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/pe20110517.wordpress.com/1174/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/pe20110517.wordpress.com/1174/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=pure-essence.net&amp;blog=23194870&amp;post=1174&amp;subd=pe20110517&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://pure-essence.net/2007/06/29/simple-php-path-rewrite/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/fcfd5e14ca9c91790e95dfdb1d2ad756?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">pureessence</media:title>
		</media:content>
	</item>
	</channel>
</rss>
