PHPackages                             ambimax/magento-module-ambimax-productnotfoundhandler - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. ambimax/magento-module-ambimax-productnotfoundhandler

ActiveMagento-module

ambimax/magento-module-ambimax-productnotfoundhandler
=====================================================

Handles product redirect if sku is found in url

1.0.2(6y ago)018MITPHP

Since Oct 10Pushed 6y ago4 watchersCompare

[ Source](https://github.com/ambimax/magento-module-ambimax-productnotfoundhandler)[ Packagist](https://packagist.org/packages/ambimax/magento-module-ambimax-productnotfoundhandler)[ RSS](/packages/ambimax-magento-module-ambimax-productnotfoundhandler/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (3)Dependencies (1)Versions (4)Used By (0)

ambimax® ProductNotFoundHandler
===============================

[](#ambimax-productnotfoundhandler)

When importing products the url-key is extended by a continuing number that makes it unique. Additionally a permanent redirect is created from the old url to the new one. Therefore the `core_url_rewrite` table grows rapidly and slows many Magento sites down.

To solve this problem we add the sku to the urls and make old urls forever (as long as the product with same sku exists) redirectable without overhead. This module reads the sku from url and redirects to the new url.

Usage
-----

[](#usage)

Url must use this pattern

```
http://domain.tld/any-string-{sku}-{skuLength}/

```

Sku must not contain any characters except for #\[^0-9a-z\]+#i

Composer
--------

[](#composer)

```
composer require ambimax/magento-module-ambimax-productnotfoundhandler

```

Installation
------------

[](#installation)

1. Install like any other (modman/composer) module
2. To enable it please set Configuration &gt; Web &gt; Default Pages &gt; CMS No Route Page (web/default/no\_route) to `productnotfoundhandler/index/noRoute` (default: cms/index/noRoute)
3. Add sku and skuLength to all url-key attribute of all products

Example import usage:

```

    /**
     * Prepare product data on import
     *
     * @param array $productData
     * @return array
     */
    public function row(array $productData)
    {
        // ...
        $url = array($productData['amazon_titel'], $productData['sku'], strlen($productData['sku']));
        $product['url_key'] = $this->formatUrlKey(implode(' ', $url));

        // ...

        return $productData;
    }

    /**
     * Format Key for URL
     *
     * @param string $str
     * @return string
     */
    public function formatUrlKey($str)
    {
        $urlKey = preg_replace('#[^0-9a-z]+#i', '-', strtolower(Mage::helper('catalog/product_url')->format($str)));
        $urlKey = trim($urlKey, '-');

        return $urlKey;
    }

```

Disclaimer
----------

[](#disclaimer)

This module comes with no warranty at all.

License
-------

[](#license)

[MIT License](http://choosealicense.com/licenses/mit/)

Author Information
------------------

[](#author-information)

- Julian Bour, [ambimax® GmbH](https://www.ambimax.de)
- Tobias Schifftner, [ambimax® GmbH](https://www.ambimax.de)

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~318 days

Total

3

Last Release

2500d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8efdb9ca503ce1ca4d650ae51ba85c9a1cc5de950c9a3947adcbed17df991e78?d=identicon)[tschifftner](/maintainers/tschifftner)

---

Top Contributors

[![tschifftner](https://avatars.githubusercontent.com/u/14741874?v=4)](https://github.com/tschifftner "tschifftner (6 commits)")

### Embed Badge

![Health badge](/badges/ambimax-magento-module-ambimax-productnotfoundhandler/health.svg)

```
[![Health](https://phpackages.com/badges/ambimax-magento-module-ambimax-productnotfoundhandler/health.svg)](https://phpackages.com/packages/ambimax-magento-module-ambimax-productnotfoundhandler)
```

###  Alternatives

[algolia/algoliasearch-magento

Algolia Search for Magento

16648.8k](/packages/algolia-algoliasearch-magento)[inviqa/magento-symfony-container

Provides Magento with an instance of a Symfony DI Container

2436.5k](/packages/inviqa-magento-symfony-container)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
