PHPackages                             matusstafura/magento2-category-redirect - 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. [Localization &amp; i18n](/categories/localization)
4. /
5. matusstafura/magento2-category-redirect

ActiveMagento2-module[Localization &amp; i18n](/categories/localization)

matusstafura/magento2-category-redirect
=======================================

Universal category redirect module for Magento 2 - creates store-agnostic category links using category ID

v0.1.1(6mo ago)142MITPHPPHP &gt;=8.1

Since Oct 10Pushed 6mo agoCompare

[ Source](https://github.com/matusstafura/magento2-category-redirect)[ Packagist](https://packagist.org/packages/matusstafura/magento2-category-redirect)[ RSS](/packages/matusstafura-magento2-category-redirect/feed)WikiDiscussions main Synced 1mo ago

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

Magento 2 Category Redirect Module
==================================

[](#magento-2-category-redirect-module)

A Magento 2 module that creates universal, store-agnostic category links for multi-language and multi-store setups that redirect to the correct localized category URL based on the current store view.

This is useful when you need **a single category link that works across all store views**, such as in blog posts, email campaigns, or external marketing materials.

Example
-------

[](#example)

- Universal link: `/category?id=124` where `124` is the category ID for "Electronics".

You can use this link in any store view, and it will redirect to the appropriate localized category URL.

Problem Solved
--------------

[](#problem-solved)

When managing a Magento 2 multi-store setup with different languages, category URLs differ across stores:

- English: `/electronics.html`
- French: `/electronique.html`
- German: `/elektronik.html`

Solves problems for blog posts, email campaigns, and any content where you need a single category link to work across all store views.

This module lets you use **one universal link** that automatically redirects to the correct localized category URL based on the current store.

Features
--------

[](#features)

**Store-agnostic category links** - One link works across all languages
**SEO-friendly 301 redirects** - Passes link equity to final category URLs
**Active category check** - Only redirects to active categories **Zero configuration** - Works immediately after installation
**Magento 2.4.7 compatible** - Uses modern `HttpGetActionInterface`
**Lightweight** - No database changes, no admin configuration

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- Magento &gt;= 2.4.7
- Composer (optional, for installation via composer)

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

[](#installation)

### Option 1: Composer Installation (Recommended)

[](#option-1-composer-installation-recommended)

```
composer require matusstafura/magento2-category-redirect
php bin/magento module:enable MatusStafura_CategoryRedirect
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
```

### Option 2: Manual Installation

[](#option-2-manual-installation)

1. Create module directory:

```
mkdir -p app/code/MatusStafura/CategoryRedirect
```

2. Copy all module files to `app/code/MatusStafura/CategoryRedirect/`
3. Enable the module:

```
php bin/magento module:enable MatusStafura_CategoryRedirect
php bin/magento setup:upgrade
php bin/magento setup:di:compile
php bin/magento cache:flush
```

Usage
-----

[](#usage)

Create links using category ID:

```
View Electronics
Shop Women's Clothing
Browse Sale Items
```

Configuration
-------------

[](#configuration)

No configuration needed! The module works out of the box after installation.

Uninstallation
--------------

[](#uninstallation)

```
php bin/magento module:disable MatusStafura_CategoryRedirect
php bin/magento setup:upgrade
php bin/magento cache:flush

# Optionally remove module files
rm -rf app/code/MatusStafura/CategoryRedirect
```

Compatibility
-------------

[](#compatibility)

- ✅ Magento 2.4.7
- ✅ Magento 2.4.6
- ✅ Magento 2.4.5
- ✅ PHP 8.1, 8.2, 8.3

License
-------

[](#license)

MIT License - See [LICENSE](LICENSE) for details.

Support
-------

[](#support)

For issues, questions, or contributions:

- Create an issue on GitHub
- Submit a pull request
- Contact the author

Contributing
------------

[](#contributing)

Contributions are welcome! Please fork the repository and submit a pull request.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance66

Regular maintenance activity

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity35

Early-stage or recently created project

 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 ~10 days

Total

2

Last Release

203d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f56918987521c7c4b77e80e82275ef0ee2be4567bf65f207237f788524938f88?d=identicon)[matusstafura](/maintainers/matusstafura)

---

Top Contributors

[![matusstafura](https://avatars.githubusercontent.com/u/11353888?v=4)](https://github.com/matusstafura "matusstafura (2 commits)")

---

Tags

magentomultilingualmoduleredirectseocategorymagento2multi-store

### Embed Badge

![Health badge](/badges/matusstafura-magento2-category-redirect/health.svg)

```
[![Health](https://phpackages.com/badges/matusstafura-magento2-category-redirect/health.svg)](https://phpackages.com/packages/matusstafura-magento2-category-redirect)
```

###  Alternatives

[imaginaerum/magento2-language-fr-fr

Magento2 French Language Pack (fr\_FR)

41738.1k2](/packages/imaginaerum-magento2-language-fr-fr)[opengento/module-category-import-export

This module add the capability to import and export the categories from the back-office.

119.1k](/packages/opengento-module-category-import-export)[the_it_nerd/module-brasil

The IT Nerd - Magento 2 Brazilian localization module (without translation).

161.3k](/packages/the-it-nerd-module-brasil)[opengento/module-webapi-logger

This module allows you to analyze all the webapi rest done call toward your Magento.

1014.9k](/packages/opengento-module-webapi-logger)

PHPackages © 2026

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