📊 State of Magento 2025

The Home for Magento 2 Excellence

Quality-tested Magento 2 modules. Explore. Evaluate. Elevate. #magento2

606 Modules
385 Ready
218 Need Help
🏆 Leaderboard
Popular Module Potentially Abandoned v1.1.0

Fisheye_UrlRewriteOptimiser

fisheye/module-url-rewrite-optimiser

A Magento module that stops URL rewrites with category paths being generated for products when 'Use Categories Path for Product URLs' setting is disabled in the config.

226,855
Downloads
Above average
58
GitHub Stars
Above average
3y ago
Last Release
3
Open Issues
Build Passing
Ready to install

Build Tests

Composer Install
DI Compile
Templates

Code Quality

CS Coding Standard
11 warnings
L5 PHPStan

Tested on Magento 2.4.8-p3

Recent Test History

Each release is tested against the latest Magento version at that time.

v1.1.0 on Magento 2.4.8-p3
Dec 15, 2025
v1.1.0 on Magento 2.4.8-p2
Aug 14, 2025
v1.1.0 on Magento 2.4.8
May 18, 2025
v1.1.0 on Magento 2.4.7-p4
Feb 15, 2025
v1.1.0 on Magento 2.4.7-p3
Oct 15, 2024
v1.1.0 on Magento 2.4.7-p2
Sep 8, 2024

+4 older tests

Share This Module's Status

Fisheye_UrlRewriteOptimiser Magento compatibility status badge

README

Loaded from GitHub

Fisheye_UrlRewriteOptimiser

Overview

A Magento module that stops URL rewrites with category paths being generated for products when 'Use Categories Path for Product URLs' setting is disabled in config.

Features

  • Stop needless URL rewrites for products that include category paths being created
  • Only applies when 'Use Categories Path for Product URLs' setting is set to 'No'

Note: this extension will only prevent category path based URL rewrites from being created. Removing existing URL rewrites will need to be managed separately (though may be added in a future version).

Issue

To highlight the issue (and purpose of this module) see the 2 scenarios below

Without module enabled

Without module enabled

  • 'Joust Duffle Bag' product is in 2 categories ('Gear' and 'Bags')
  • 4 product URL rewrite records are created for this product
    • 1 for the direct product URL
    • 3 for category path URLS (2 for the categories the product is associated to and also the root category...)
  • Overall 580 product URL rewrite records are created (using Magento's default sample data of 189 visible products and 39 categories)

With module enabled

Without module enabled

  • 'Joust Duffle Bag' product now just has 1 URL rewrite record for the direct path
  • Overall reduced to 189 product URL rewrite records (i.e. 1 per visible product)
  • Scale that up to thousands of products, categories, websites and store views and the space saved in the url_rewrite table could be huge!

Compatibility

  • PHP 7.x
  • Magento Open Source / Commerce Edition 2.1.x / 2.2.x (may work on older versions, but untested)

Installation

composer require fisheye/module-url-rewrite-optimiser
php bin/magento module:enable Fisheye_UrlRewriteOptimiser
php bin/magento setup:upgrade

Cleanup

If you installed this extension to prevent product rewrites with a category path being generated and you want to clean up your existing rewrites by removing them, run this query;

DELETE FROM url_rewrite
  WHERE is_autogenerated = 1          AND request_path LIKE '%/%'
  AND target_path LIKE '%/category/%' AND target_path  LIKE '%/product/%'
  AND entity_type = 'product'         AND metadata     LIKE '%category_id%';

Contributing

Issues, forks and pull requests welcomed :)

This content is fetched directly from the module's GitHub repository. We are not the authors of this content and take no responsibility for its accuracy, completeness, or any consequences arising from its use.