Download the PHP package jainamdeveloper/magento2-custom-redirect without Composer

On this page you can find all versions of the php package jainamdeveloper/magento2-custom-redirect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package magento2-custom-redirect

Magento 2 Custom Redirect — 404 NoRoute Handler

A lightweight Magento 2 module that automatically recovers visitors from 404 pages by redirecting them to the most relevant active page using 301 redirects. Instead of bouncing customers to a dead end, this module intelligently resolves deleted or disabled URLs to their best matching destination.

Why Use This Module

When you restructure your Magento 2 store — disable categories, remove products, or migrate from a legacy URL structure — customers and search engines hit 404 pages. Every 404 is a lost visitor and a wasted SEO signal.

This module intercepts every NoRoute (404) request in Magento 2 and resolves it automatically:

Net result: fewer exits, preserved SEO link equity via 301 signals, and old URLs never fully break.

How It Works

The module registers an aroundPlugin on Magento\Cms\Controller\Noroute\Index::execute. On every 404 request in Magento 2:

  1. Looks up the requested path in the url_rewrite table
  2. If a rewrite exists, determines entity type (category or product) and finds the best active redirect target
  3. If no rewrite exists, checks legacy URL patterns
  4. Falls back to the store homepage if no valid target is found

All redirects are issued as HTTP 301 (permanent), so search engines transfer link equity to the new URL.

Requirements

Installation

Via Composer (recommended)

Manual Installation

  1. Copy the module files to app/code/Magneto/CustomRedirect/
  2. Run the following commands:

Redirect Logic Reference

Incoming URL type Redirect Target
Disabled/deleted category Nearest active parent category
Removed/disabled product First active category the product belonged to
Legacy view-shape/<sku> URL Product URL resolved by SKU
Any other 404 Store homepage

Keywords

Magento 2 custom redirect, Magento 2 404 redirect, Magento 2 NoRoute plugin, Magento 2 301 redirect, Magento 2 SEO redirect, Magento 2 category redirect, Magento 2 product redirect, Magento 2 URL rewrite redirect, Magento 2 404 handler, Magento 2 page not found redirect

License

MIT


All versions of magento2-custom-redirect with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
magento/framework Version >=103.0.0
magento/module-catalog Version >=104.0.0
magento/module-cms Version >=104.0.0
magento/module-store Version >=101.0.0
magento/module-url-rewrite Version >=102.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jainamdeveloper/magento2-custom-redirect contains the following files

Loading the files please wait ...