https://github.com/magehost/magehost_rewritefix
This free open source extension solves a problem most big #Magento 1.x shops face: an ever growing huge URL Rewrite table. This extension solves a still existing bug in Magento 1.x which creates unnecessary rewrites all the time. It can also clean up the existing mess.
https://github.com/magehost/magehost_rewritefix
Last synced: 6 months ago
JSON representation
This free open source extension solves a problem most big #Magento 1.x shops face: an ever growing huge URL Rewrite table. This extension solves a still existing bug in Magento 1.x which creates unnecessary rewrites all the time. It can also clean up the existing mess.
- Host: GitHub
- URL: https://github.com/magehost/magehost_rewritefix
- Owner: magehost
- Created: 2015-02-07T21:46:36.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-09-26T09:29:17.000Z (almost 7 years ago)
- Last Synced: 2025-08-12T12:26:20.932Z (11 months ago)
- Language: PHP
- Homepage: https://MageHost.pro
- Size: 68.4 KB
- Stars: 28
- Watchers: 8
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
## MageHost_RewriteFix
**We are sorry but we cannot offer customer support for this extension, and it is provided "as-is" for free. We use it at a number of big shops and it works well.**
Due to bugs in Magento, once an rewrite URL ends with -[number] you get more and more rewrite URLs to the same target. The number gets higher and higher. Indexing gets slower and slower.
This extension is a workaround for this problem.
Requires Magento 1.7.0.2 or greater.
#### How to install using Modman (--copy)
1. Make sure you run Magento 1.7 or newer
1. Install [Modman](https://github.com/colinmollenhour/modman)
1. `cd` to your Magento root dir
1. `test -d .modman || modman init`
1. `modman clone --copy --force https://github.com/magehost/magehost_rewritefix`
1. If you keep your Magento code in Git: Add `.modman` to your `.gitignore`
1. Run `php shell/mh_rewrite_cleanup.php -- cleanup` once
1. Reindex the `catalog_url` index
#### Verify if needed
You can verify if your installation has this problem by using this query (presuming no DB prefix). If the largest count is > the number of store views then this is a hint that something is wrong.
```sql
SELECT `id_path`, COUNT(*) as `total`
FROM `core_url_rewrite`
GROUP BY `id_path`
ORDER BY `total` DESC
```
For deeper investigation you can inspect the rows with the highest count using ```SELECT * FROM `core_url_rewrite` WHERE `id_path`='[id_path from previous query]'```
There should be 1 entry per id_path for every store view - and not more - unless you renamed the product URI yourself.