<?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: Permalink Redirect WordPress Plugin 0.5</title>
	<atom:link href="http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/feed/" rel="self" type="application/rss+xml" />
	<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/</link>
	<description>Faith, Technology and Randomness in Life, According to Scott</description>
	<lastBuildDate>Tue, 09 Mar 2010 18:56:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Drew Vogel</title>
		<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/comment-page-1/#comment-87987</link>
		<dc:creator>Drew Vogel</dc:creator>
		<pubDate>Thu, 17 Aug 2006 13:59:42 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/#comment-87987</guid>
		<description>Thanks in advance!</description>
		<content:encoded><![CDATA[<p>Thanks in advance!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Drew Vogel</title>
		<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/comment-page-1/#comment-87986</link>
		<dc:creator>Drew Vogel</dc:creator>
		<pubDate>Thu, 17 Aug 2006 13:58:33 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/#comment-87986</guid>
		<description>I am having a very strange problem with my established WordPress (2.0.4) installation at www.drewvogel.com. If I go to Options&gt;Permalinks, my permalinks stop working (even if I don&#039;t click &quot;Update Permalink Settings&quot;). Simply viewing the Permalink settings page is enough to break it. This is 100% reproducable. The server is a Fedora Core 5 server with all the latest patches.

Can anyone help me to fix this problem?</description>
		<content:encoded><![CDATA[<p>I am having a very strange problem with my established WordPress (2.0.4) installation at <a href="http://www.drewvogel.com" rel="nofollow">http://www.drewvogel.com</a>. If I go to Options&gt;Permalinks, my permalinks stop working (even if I don&#8217;t click &#8220;Update Permalink Settings&#8221;). Simply viewing the Permalink settings page is enough to break it. This is 100% reproducable. The server is a Fedora Core 5 server with all the latest patches.</p>
<p>Can anyone help me to fix this problem?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/comment-page-1/#comment-87967</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Mon, 19 Jun 2006 21:19:55 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/#comment-87967</guid>
		<description>works</description>
		<content:encoded><![CDATA[<p>works</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/comment-page-1/#comment-87966</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Mon, 19 Jun 2006 21:19:39 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/#comment-87966</guid>
		<description>It work perfectly, many thanks</description>
		<content:encoded><![CDATA[<p>It work perfectly, many thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/comment-page-1/#comment-87965</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Mon, 19 Jun 2006 16:19:23 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/#comment-87965</guid>
		<description>Thanks, i will try that a.s.p.</description>
		<content:encoded><![CDATA[<p>Thanks, i will try that a.s.p.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Yang</title>
		<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/comment-page-1/#comment-87964</link>
		<dc:creator>Scott Yang</dc:creator>
		<pubDate>Mon, 19 Jun 2006 14:27:20 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/#comment-87964</guid>
		<description>I have had a look at the code, and have guessed that the issue is with how WordPress handles 404 response.

With permalink-redirect plugin enabled, it automatically redirect any author request to the author&#039;s &quot;permalink&quot;, i.e.

GET /?author_name=foobar

will raise a &quot;301 Moved Permanently&quot; to

GET /author/foobar/

However, in WordPress (2.0.3 at least) wp-includes/classes.php WP::handle_404() function, if the post count is 0, it will send back &quot;404 Not Found&quot; message, UNLESS there is a query string.

Therefore, while /?author_name=foobar gets a 200, /author/foobar/ gets a 404, even though foobar is a valid author but without any post.

I think it is more a WordPress issue than a Permalink-Redirect issue. The same applies to category archive -- a category without any post will get a 404 if you access its permalink.

You can, however, by-pass redirecting from query-string URI to permalink URI for author profile pages, if post count equals 0. Open ylsy_permalink_redirect.php, and around line 94 (for version 0.5.3):

&lt;pre&gt;
       $author = get_userdata(get_query_var(&#039;author&#039;));
-      if ($author === false)
+      if ($author === false &#124;&#124; count($posts) == 0)
           return false;
&lt;/pre&gt;

It will then not redirecting for author profiles if author does not have any post.

I&#039;ll put in this hack in the next permalink-redirect plugin, but I do see this as a problem of WordPress&#039; way of handling 404.</description>
		<content:encoded><![CDATA[<p>I have had a look at the code, and have guessed that the issue is with how WordPress handles 404 response.</p>
<p>With permalink-redirect plugin enabled, it automatically redirect any author request to the author&#8217;s &#8220;permalink&#8221;, i.e.</p>
<p>GET /?author_name=foobar</p>
<p>will raise a &#8220;301 Moved Permanently&#8221; to</p>
<p>GET /author/foobar/</p>
<p>However, in WordPress (2.0.3 at least) wp-includes/classes.php WP::handle_404() function, if the post count is 0, it will send back &#8220;404 Not Found&#8221; message, UNLESS there is a query string.</p>
<p>Therefore, while /?author_name=foobar gets a 200, /author/foobar/ gets a 404, even though foobar is a valid author but without any post.</p>
<p>I think it is more a WordPress issue than a Permalink-Redirect issue. The same applies to category archive &#8212; a category without any post will get a 404 if you access its permalink.</p>
<p>You can, however, by-pass redirecting from query-string URI to permalink URI for author profile pages, if post count equals 0. Open ylsy_permalink_redirect.php, and around line 94 (for version 0.5.3):</p>
<pre>
       $author = get_userdata(get_query_var('author'));
-      if ($author === false)
+      if ($author === false || count($posts) == 0)
           return false;
</pre>
<p>It will then not redirecting for author profiles if author does not have any post.</p>
<p>I&#8217;ll put in this hack in the next permalink-redirect plugin, but I do see this as a problem of WordPress&#8217; way of handling 404.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/comment-page-1/#comment-87963</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Mon, 19 Jun 2006 11:55:14 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/#comment-87963</guid>
		<description>The problem is also discussed here:

http://wordpress.org/support/topic/64766?replies=4#post-397299</description>
		<content:encoded><![CDATA[<p>The problem is also discussed here:</p>
<p><a href="http://wordpress.org/support/topic/64766?replies=4#post-397299" rel="nofollow">http://wordpress.org/support/topic/64766?replies=4#post-397299</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/comment-page-1/#comment-87962</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Mon, 19 Jun 2006 11:54:03 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/#comment-87962</guid>
		<description>Yes it works without the plugin, that is the whole problem :-)

I personally do not mind if there is an exception for the author pages = no permalink structure for these pages. But I haven&#039;t got a clue how to write an exception.</description>
		<content:encoded><![CDATA[<p>Yes it works without the plugin, that is the whole problem :-)</p>
<p>I personally do not mind if there is an exception for the author pages = no permalink structure for these pages. But I haven&#8217;t got a clue how to write an exception.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Scott Yang</title>
		<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/comment-page-1/#comment-87961</link>
		<dc:creator>Scott Yang</dc:creator>
		<pubDate>Mon, 19 Jun 2006 11:37:31 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/#comment-87961</guid>
		<description>Vincent,

Check whether it works *without* the plugin.

From what I have seen, it is redirecting to the right URL, but because of the way WordPress&#039; &quot;the loop&quot; works, if there is no article in archive (for that category, author, date, etc), it will produce a 404 on that page.</description>
		<content:encoded><![CDATA[<p>Vincent,</p>
<p>Check whether it works *without* the plugin.</p>
<p>From what I have seen, it is redirecting to the right URL, but because of the way WordPress&#8217; &#8220;the loop&#8221; works, if there is no article in archive (for that category, author, date, etc), it will produce a 404 on that page.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vincent</title>
		<link>http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/comment-page-1/#comment-87960</link>
		<dc:creator>Vincent</dc:creator>
		<pubDate>Mon, 19 Jun 2006 10:59:55 +0000</pubDate>
		<guid isPermaLink="false">http://scott.yang.id.au/2006/02/permalink-redirect-wordpress-plugin-05/#comment-87960</guid>
		<description>The author page is still not working. it only displays author pages when the author has written a post. But not a author page of someone who has only registered of responded to post

for example on these pages: 

http://www.ochblog.com/members/

and

http://www.bangkoktalk.nl/alle-leden/

I am using your version  0.5.3</description>
		<content:encoded><![CDATA[<p>The author page is still not working. it only displays author pages when the author has written a post. But not a author page of someone who has only registered of responded to post</p>
<p>for example on these pages: </p>
<p><a href="http://www.ochblog.com/members/" rel="nofollow">http://www.ochblog.com/members/</a></p>
<p>and</p>
<p><a href="http://www.bangkoktalk.nl/alle-leden/" rel="nofollow">http://www.bangkoktalk.nl/alle-leden/</a></p>
<p>I am using your version  0.5.3</p>
]]></content:encoded>
	</item>
</channel>
</rss>
