<?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: Nitpicking Magento Custom URL Rewrite Management for 301 Redirects</title>
	<atom:link href="http://thewhatscool.com/seo/magento-301-rewrites.html/feed" rel="self" type="application/rss+xml" />
	<link>http://thewhatscool.com/seo/magento-301-rewrites.html</link>
	<description></description>
	<lastBuildDate>Thu, 01 Jul 2010 00:52:10 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Adam</title>
		<link>http://thewhatscool.com/seo/magento-301-rewrites.html/comment-page-1#comment-50</link>
		<dc:creator>Adam</dc:creator>
		<pubDate>Mon, 14 Jun 2010 14:06:03 +0000</pubDate>
		<guid isPermaLink="false">http://thewhatscool.com/?p=28#comment-50</guid>
		<description>THIS IS ONE SOLUTION:


Edit /app/code/core/Mage/Catalog/Model/Url.php

Find line 632 and change: 
//if (null === $parentPath) {
                    //$parentPath = $this-&gt;getResource()-&gt;getCategoryParentPath($category);
                //}
                //elseif ($parentPath == &#039;/&#039;) {
                    $parentPath = &#039;&#039;;
                //}</description>
		<content:encoded><![CDATA[<p>THIS IS ONE SOLUTION:</p>
<p>Edit /app/code/core/Mage/Catalog/Model/Url.php</p>
<p>Find line 632 and change:<br />
//if (null === $parentPath) {<br />
                    //$parentPath = $this-&gt;getResource()-&gt;getCategoryParentPath($category);<br />
                //}<br />
                //elseif ($parentPath == &#8216;/&#8217;) {<br />
                    $parentPath = &#8221;;<br />
                //}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brendan</title>
		<link>http://thewhatscool.com/seo/magento-301-rewrites.html/comment-page-1#comment-43</link>
		<dc:creator>Brendan</dc:creator>
		<pubDate>Tue, 01 Jun 2010 09:38:12 +0000</pubDate>
		<guid isPermaLink="false">http://thewhatscool.com/?p=28#comment-43</guid>
		<description>Thank you so much for posting this! you&#039;re right this is completely un-intuitive, the line &quot;2. Use the path of the URL to be redirected for both “ID Path” and “Request Path” — the “Target Path” is the URL to redirect to.&quot; should be made bold :)

Thanks</description>
		<content:encoded><![CDATA[<p>Thank you so much for posting this! you&#8217;re right this is completely un-intuitive, the line &#8220;2. Use the path of the URL to be redirected for both “ID Path” and “Request Path” — the “Target Path” is the URL to redirect to.&#8221; should be made bold <img src='http://thewhatscool.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: gavin</title>
		<link>http://thewhatscool.com/seo/magento-301-rewrites.html/comment-page-1#comment-4</link>
		<dc:creator>gavin</dc:creator>
		<pubDate>Mon, 30 Nov 2009 07:00:27 +0000</pubDate>
		<guid isPermaLink="false">http://thewhatscool.com/?p=28#comment-4</guid>
		<description>Tom - From what you&#039;re describing, it sounds like you&#039;ve changed the System rewrite for your category from the default &quot;No&quot; redirect to a &quot;Permanent (301)&quot; redirect. The following is making that assumption, let me know if I&#039;m wrong!

Magento treats the target path for a &lt;strong&gt;rewrite&lt;/strong&gt; as the resource to display at the URL requested by the browser-- when a &lt;strong&gt;redirect&lt;/strong&gt; is specified, the target path becomes the literal &quot;Location&quot; in the server response header (moved permanently to:), and is subsequently displayed as such in the browser.

A permanent redirect in Magento&#039;s URL Rewrite Management should be created as a Custom Rewrite (with &quot;Redirect: Permanent (301)&quot; selected) separate from/in addition to the default (unedited) System non-redirecting rewrite. 

Here&#039;s where it gets totally un-intuitive: 
1. Ignore Magento&#039;s system/internal identification paths.
2. Use the path of the URL &lt;em&gt;to be redirected&lt;/em&gt; for both &quot;ID Path&quot; and &quot;Request Path&quot; -- the &quot;Target Path&quot; is the &lt;em&gt;URL to redirect to&lt;/em&gt;.

I&#039;m interested to know what you&#039;re shooting for in your canonicalization efforts -- Is it just the problem you described here (a request for energy-star.html returns &quot;catalog/category/view/id/47&quot;)? Wrestling with Magento&#039;s built in duplicate content engine (one product page on the root and a duplicate for every category and subcategory)?

I ask because I&#039;ve only had to redirect pages that I&#039;ve renamed -- and I think I&#039;ll check out Yoast&#039;s &quot;Canonical URLs for Magento&quot; extension (adds the link rel=&quot;canonical&quot; tag) for the duplicate content issues.</description>
		<content:encoded><![CDATA[<p>Tom &#8211; From what you&#8217;re describing, it sounds like you&#8217;ve changed the System rewrite for your category from the default &#8220;No&#8221; redirect to a &#8220;Permanent (301)&#8221; redirect. The following is making that assumption, let me know if I&#8217;m wrong!</p>
<p>Magento treats the target path for a <strong>rewrite</strong> as the resource to display at the URL requested by the browser&#8211; when a <strong>redirect</strong> is specified, the target path becomes the literal &#8220;Location&#8221; in the server response header (moved permanently to:), and is subsequently displayed as such in the browser.</p>
<p>A permanent redirect in Magento&#8217;s URL Rewrite Management should be created as a Custom Rewrite (with &#8220;Redirect: Permanent (301)&#8221; selected) separate from/in addition to the default (unedited) System non-redirecting rewrite. </p>
<p>Here&#8217;s where it gets totally un-intuitive:<br />
1. Ignore Magento&#8217;s system/internal identification paths.<br />
2. Use the path of the URL <em>to be redirected</em> for both &#8220;ID Path&#8221; and &#8220;Request Path&#8221; &#8212; the &#8220;Target Path&#8221; is the <em>URL to redirect to</em>.</p>
<p>I&#8217;m interested to know what you&#8217;re shooting for in your canonicalization efforts &#8212; Is it just the problem you described here (a request for energy-star.html returns &#8220;catalog/category/view/id/47&#8243;)? Wrestling with Magento&#8217;s built in duplicate content engine (one product page on the root and a duplicate for every category and subcategory)?</p>
<p>I ask because I&#8217;ve only had to redirect pages that I&#8217;ve renamed &#8212; and I think I&#8217;ll check out Yoast&#8217;s &#8220;Canonical URLs for Magento&#8221; extension (adds the link rel=&#8221;canonical&#8221; tag) for the duplicate content issues.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom Harrison</title>
		<link>http://thewhatscool.com/seo/magento-301-rewrites.html/comment-page-1#comment-3</link>
		<dc:creator>Tom Harrison</dc:creator>
		<pubDate>Wed, 25 Nov 2009 15:45:27 +0000</pubDate>
		<guid isPermaLink="false">http://thewhatscool.com/?p=28#comment-3</guid>
		<description>Hi --  I found this post as I was trying to sort out what appears to be a similar issue.

When I select Catalog Rewrite Management and edit one of the system entries, id path, request path and target path seem ... backwards.  And they are not editable for some reason (I am an admin), even if I try to make a custom rewrite.

The problem is the &quot;request path&quot; has the key name, e.g. &quot;energy-star&quot;, and the id path has one form (category/47) while the target path has another (catalog/category/view/id/47).  I read this as &quot;when a request comes in with the name energy-star send it to catalog/category/view/id/47.  This is fine, but if I enable 301 redirects, Magento does a 301 redirect from the clean URL to the catalog/category/view/id/47 URL.  Same with products.

I want the opposite: since there are several cases where Magento displays the non-canonical form of a product or category URL, I want Magento to 301 redirect to the canonical (&quot;clean&quot;) form.  But this doesn&#039;t seem to be possible.

Am I missing something?

Thanks!

Tom</description>
		<content:encoded><![CDATA[<p>Hi &#8212;  I found this post as I was trying to sort out what appears to be a similar issue.</p>
<p>When I select Catalog Rewrite Management and edit one of the system entries, id path, request path and target path seem &#8230; backwards.  And they are not editable for some reason (I am an admin), even if I try to make a custom rewrite.</p>
<p>The problem is the &#8220;request path&#8221; has the key name, e.g. &#8220;energy-star&#8221;, and the id path has one form (category/47) while the target path has another (catalog/category/view/id/47).  I read this as &#8220;when a request comes in with the name energy-star send it to catalog/category/view/id/47.  This is fine, but if I enable 301 redirects, Magento does a 301 redirect from the clean URL to the catalog/category/view/id/47 URL.  Same with products.</p>
<p>I want the opposite: since there are several cases where Magento displays the non-canonical form of a product or category URL, I want Magento to 301 redirect to the canonical (&#8220;clean&#8221;) form.  But this doesn&#8217;t seem to be possible.</p>
<p>Am I missing something?</p>
<p>Thanks!</p>
<p>Tom</p>
]]></content:encoded>
	</item>
</channel>
</rss>
