<?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/"
	>

<channel>
	<title>The Magento Expert</title>
	<atom:link href="https://www.the-mage-expert.com/tag/rewrites/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.the-mage-expert.com</link>
	<description>Your Magento Commerce Expert</description>
	<lastBuildDate>Tue, 24 Nov 2026 08:23:52 +0000</lastBuildDate>
	<language>de-DE</language>
		<sy:updatePeriod>hourly</sy:updatePeriod>
		<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.8.6</generator>
	<item>
		<title>Finding Product URL Rewrites with SQL</title>
		<link>https://www.the-mage-expert.com/3246/finding-product-url-rewrites-with-sql/</link>
		<comments>https://www.the-mage-expert.com/3246/finding-product-url-rewrites-with-sql/#comments</comments>
		<pubDate>Mon, 19 Oct 2026 19:55:22 +0000</pubDate>
		<dc:creator><![CDATA[Mex]]></dc:creator>
				<category><![CDATA[Magento Solutions]]></category>
		<category><![CDATA[Magento 2]]></category>
		<category><![CDATA[Rewrites]]></category>
		<category><![CDATA[url]]></category>

		<guid isPermaLink="false">https://www.the-mage-expert.com/?p=3246</guid>
		<description><![CDATA[When product URLs behave unexpectedly, a direct look at Magento&#8217;s url_rewritetable can be useful. It stores public-facing paths, internal targets and redirects for product URLs. Use the following query to display URL rewrites for a specific SKU: [crayon-6b05f01418c47/] request_path contains&#8230;]]></description>
				<content:encoded><![CDATA[<p>When product URLs behave unexpectedly, a direct look at Magento&#8217;s <strong>url_rewrite</strong>table can be useful. It stores public-facing paths, internal targets and redirects for product URLs.</p>
<p>Use the following query to display URL rewrites for a specific SKU:</p><pre class="crayon-plain-tag">SELECT
    p.sku,
    u.store_id,
    s.code AS store_code,
    s.name AS store_name,
    u.request_path,
    u.target_path,
    u.redirect_type
FROM url_rewrite AS u
JOIN catalog_product_entity AS p
    ON u.entity_id = p.entity_id
LEFT JOIN store AS s
    ON s.store_id = u.store_id
WHERE u.entity_type = 'product'
  AND p.sku = 'MEINE-SKU'
ORDER BY u.store_id, u.request_path;</pre><p><strong>request_path</strong> contains the URL visible to customers, while <strong>target_path</strong> points to Magento&#8217;s internal target. The field <strong>store_id</strong> bzw. <strong>store_name</strong> identifies which store view each rewrite belongs to.</p>
<p>Several entries for one product are not necessarily duplicates or errors. Different <strong>store_id</strong> values usually mean Magento maintains separate rewrites for different store views.</p>
<p>Also useful is <strong>redirect_type</strong>. The value <strong>0</strong> means a normal rewrite without a redirect, <strong>301</strong> and <strong>302</strong> indicate permanent and temporary redirects respectively.</p>
<p>After changing URL keys, migrating or importing data, this query helps you see which rewrites Magento actually stores for a product.</p>]]></content:encoded>
			<wfw:commentRss>https://www.the-mage-expert.com/3246/finding-product-url-rewrites-with-sql/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
