<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
 <generator>http://textpattern.com/</generator>
 <title>Textpattern Tips – Rewrite individual article URL to the section page</title>
 <description>Rewrite individual article URL to the section page - comments</description>
 <link>https://textpattern.tips/rewrite-individual-article-url-to-the-section-page</link>
 <atom:link href="https://textpattern.tips/rewrite-individual-article-url-to-the-section-page?f=comment-feed" rel="self" type="application/rss+xml" />
 <pubDate>Thu, 26 May 11 14:39:29 +0000</pubDate>

 <item>
     <title>Comment on Rewrite individual article URL to the section page by AlanW</title>
     <link><a href="https://textpattern.tips/rewrite-individual-article-url-to-the-section-page#c000867" id="c000867">1</a></link>
     <guid><a href="https://textpattern.tips/rewrite-individual-article-url-to-the-section-page#c000867" id="c000867">1</a></guid>
     <pubDate>Wed, 26 Jan 11 14:45:18 +0000</pubDate>
     <description><![CDATA[<p>I understand the need, and it exposes a weakness in Textpattern&#8217;s search, but I&#8217;m not sure of the implications of 301-ing a page that actually has value (seems contradictory.)  Could you use a search results form to rewrite the url?</p><pre><code>&lt;txp:if_article_section name="about"&gt;
&lt;txp:section name="about"&gt;&lt;txp:title /&gt;&lt;/txp:section&gt;
&lt;txp:else /&gt;
&lt;txp:whatever /&gt;
&lt;/txp:if_article_section&gt;
</code></pre><p>You could then canonicalize the url:</p><pre><code>&lt;link rel="canonical" href="&lt;txp:site_url /&gt;&lt;txp:section /&gt;" /&gt;
</code></pre><p>And add to preserve any links.:</p><pre><code>&lt;link rel="noindex,noarchive,follow" /&gt;
</code></pre>]]></description>
     <content:encoded><![CDATA[<p>I understand the need, and it exposes a weakness in Textpattern&#8217;s search, but I&#8217;m not sure of the implications of 301-ing a page that actually has value (seems contradictory.)  Could you use a search results form to rewrite the url?</p><pre><code>&lt;txp:if_article_section name="about"&gt;
&lt;txp:section name="about"&gt;&lt;txp:title /&gt;&lt;/txp:section&gt;
&lt;txp:else /&gt;
&lt;txp:whatever /&gt;
&lt;/txp:if_article_section&gt;
</code></pre><p>You could then canonicalize the url:</p><pre><code>&lt;link rel="canonical" href="&lt;txp:site_url /&gt;&lt;txp:section /&gt;" /&gt;
</code></pre><p>And add to preserve any links.:</p><pre><code>&lt;link rel="noindex,noarchive,follow" /&gt;
</code></pre>]]></content:encoded>
     <dc:creator>AlanW</dc:creator>
 
</item>
<item>
     <title>Comment on Rewrite individual article URL to the section page by AlanW</title>
     <link><a href="https://textpattern.tips/rewrite-individual-article-url-to-the-section-page#c000904" id="c000904">1</a></link>
     <guid><a href="https://textpattern.tips/rewrite-individual-article-url-to-the-section-page#c000904" id="c000904">1</a></guid>
     <pubDate>Tue, 05 Apr 11 12:02:30 +0000</pubDate>
     <description><![CDATA[<p>Sorry,</p><p>&#8220;And add to preserve any links:&#8221;</p><p>Should have been:</p><pre><code>&lt;meta name="robots" content="noindex,noarchive,follow" /&gt;
</code></pre>]]></description>
     <content:encoded><![CDATA[<p>Sorry,</p><p>&#8220;And add to preserve any links:&#8221;</p><p>Should have been:</p><pre><code>&lt;meta name="robots" content="noindex,noarchive,follow" /&gt;
</code></pre>]]></content:encoded>
     <dc:creator>AlanW</dc:creator>
 
</item>
<item>
     <title>Comment on Rewrite individual article URL to the section page by Yiannis Colakides</title>
     <link><a href="https://textpattern.tips/rewrite-individual-article-url-to-the-section-page#c000954" id="c000954">1</a></link>
     <guid><a href="https://textpattern.tips/rewrite-individual-article-url-to-the-section-page#c000954" id="c000954">1</a></guid>
     <pubDate>Thu, 26 May 11 14:39:29 +0000</pubDate>
     <description><![CDATA[<p>Hi Alan,</p><p>Your method is indeed much better. By adding the code below in the <code>search_results</code> form the links direct straight to the section pages.</p><pre><code>&lt;txp:if_article_section name="section_name_1,section_name_2,etc"&gt;
&lt;h3 class="entry-title"&gt;&lt;a href="&lt;txp:site_url /&gt;&lt;txp:section /&gt;/"&gt;&lt;txp:section title="1" /&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p class="entry-summary"&gt;&lt;txp:search_result_excerpt /&gt;&lt;/p&gt;
</code>
<code>&lt;p class="small"&gt;&lt;a href="&lt;txp:site_url /&gt;&lt;txp:section /&gt;/"&gt;&lt;txp:site_url /&gt;&lt;txp:section /&gt;/&lt;/a&gt;&lt;/p&gt;
</code>
<code>&lt;txp:else /&gt;
&lt;h3 class="entry-title"&gt;&lt;txp:permlink&gt;&lt;txp:title /&gt;&lt;/txp:permlink&gt;&lt;/h3&gt;
</code>
<code>&lt;p class="entry-summary"&gt;&lt;txp:search_result_excerpt /&gt;&lt;/p&gt;
</code>
<code>&lt;p class="small"&gt;&lt;txp:permlink&gt;&lt;txp:permlink /&gt;&lt;/txp:permlink&gt;&lt;/p&gt;
&lt;/txp:if_article_section&gt;
</code></pre>]]></description>
     <content:encoded><![CDATA[<p>Hi Alan,</p><p>Your method is indeed much better. By adding the code below in the <code>search_results</code> form the links direct straight to the section pages.</p><pre><code>&lt;txp:if_article_section name="section_name_1,section_name_2,etc"&gt;
&lt;h3 class="entry-title"&gt;&lt;a href="&lt;txp:site_url /&gt;&lt;txp:section /&gt;/"&gt;&lt;txp:section title="1" /&gt;&lt;/a&gt;&lt;/h3&gt;
&lt;p class="entry-summary"&gt;&lt;txp:search_result_excerpt /&gt;&lt;/p&gt;
</code>
<code>&lt;p class="small"&gt;&lt;a href="&lt;txp:site_url /&gt;&lt;txp:section /&gt;/"&gt;&lt;txp:site_url /&gt;&lt;txp:section /&gt;/&lt;/a&gt;&lt;/p&gt;
</code>
<code>&lt;txp:else /&gt;
&lt;h3 class="entry-title"&gt;&lt;txp:permlink&gt;&lt;txp:title /&gt;&lt;/txp:permlink&gt;&lt;/h3&gt;
</code>
<code>&lt;p class="entry-summary"&gt;&lt;txp:search_result_excerpt /&gt;&lt;/p&gt;
</code>
<code>&lt;p class="small"&gt;&lt;txp:permlink&gt;&lt;txp:permlink /&gt;&lt;/txp:permlink&gt;&lt;/p&gt;
&lt;/txp:if_article_section&gt;
</code></pre>]]></content:encoded>
     <dc:creator><a rel="nofollow" href="http://www.neme.org">Yiannis Colakides</a></dc:creator>
 
</item>

</channel>
</rss>