<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Implementing Vanity URLs in PHP w/ Zend Framework</title>
	<atom:link href="http://www.joeyrivera.com/2009/implementing-vanity-urls-in-php-w-zend-framework/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.joeyrivera.com/2009/implementing-vanity-urls-in-php-w-zend-framework/</link>
	<description>Blogging about PHP, Actionscript, MySQL, and other interests.</description>
	<lastBuildDate>Sat, 04 Feb 2012 04:50:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: Mia</title>
		<link>http://www.joeyrivera.com/2009/implementing-vanity-urls-in-php-w-zend-framework/comment-page-1/#comment-1160</link>
		<dc:creator>Mia</dc:creator>
		<pubDate>Thu, 02 Jun 2011 06:36:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeyrivera.com/?p=426#comment-1160</guid>
		<description>I did not know that things like that are called vanity URLs! haha.. but i agree with you, they are easier to remember and they really look better on the address bar than those with long series of numbers!</description>
		<content:encoded><![CDATA[<p>I did not know that things like that are called vanity URLs! haha.. but i agree with you, they are easier to remember and they really look better on the address bar than those with long series of numbers!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ralph Schindler</title>
		<link>http://www.joeyrivera.com/2009/implementing-vanity-urls-in-php-w-zend-framework/comment-page-1/#comment-94</link>
		<dc:creator>Ralph Schindler</dc:creator>
		<pubDate>Mon, 31 Aug 2009 19:21:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.joeyrivera.com/?p=426#comment-94</guid>
		<description>You make an excellent point, extending the standard dispatcher is generally not the best thing to do, but after all, ZF is meant to be extended when need be :)

Some thoughts-

You could add some semantics to the vanity urls, for example /u/:username would reduce the possibility of collisions between usernames and module/controller names, after all that is the biggest problem with using top level names for vanity&#039;s sake.

You could also go the facebook-like route: force people to opt into vanity urls, what this would allow you to do is check that the name requested is not dispatchable (like a user named &quot;user&quot;).  The problem with this is you wont be able to ensure that your future code (modules and controllers) collide with an existing users vanity url.  This also allows you to do whatever caching of the list at registration time.  (You might consider invalidating the cache when a new url is registered and letting a plugin rebuild the cache only when it needs to, again lots of options here.)

One option might be to use a different 3rd level domain, like member.mysite.com/username, that would redirect to www.mysite.com/user/username, etc.

Either way, its interesting code you&#039;ve got there, as for improvements, I&#039;d try to localize everything to inside a route (even if you have to pull in the standard dispatcher).  And like you said, a cache is the best way to go since the collection of possible routes only changes when a new user comes into the system.</description>
		<content:encoded><![CDATA[<p>You make an excellent point, extending the standard dispatcher is generally not the best thing to do, but after all, ZF is meant to be extended when need be <img src='http://www.joeyrivera.com/blog_new/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Some thoughts-</p>
<p>You could add some semantics to the vanity urls, for example /u/:username would reduce the possibility of collisions between usernames and module/controller names, after all that is the biggest problem with using top level names for vanity&#8217;s sake.</p>
<p>You could also go the facebook-like route: force people to opt into vanity urls, what this would allow you to do is check that the name requested is not dispatchable (like a user named &#8220;user&#8221;).  The problem with this is you wont be able to ensure that your future code (modules and controllers) collide with an existing users vanity url.  This also allows you to do whatever caching of the list at registration time.  (You might consider invalidating the cache when a new url is registered and letting a plugin rebuild the cache only when it needs to, again lots of options here.)</p>
<p>One option might be to use a different 3rd level domain, like member.mysite.com/username, that would redirect to <a href="http://www.mysite.com/user/username" rel="nofollow">http://www.mysite.com/user/username</a>, etc.</p>
<p>Either way, its interesting code you&#8217;ve got there, as for improvements, I&#8217;d try to localize everything to inside a route (even if you have to pull in the standard dispatcher).  And like you said, a cache is the best way to go since the collection of possible routes only changes when a new user comes into the system.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

