78

I've managed to stabalize the issue as follows: Step 1: Rewrite the Catalog URL model (Using your own module: How To) Note: If you overwrite the core file without using a rewrite this will render your instance of Magento incapable of future upgrades. As per Jahnni's solution on the MagentoCommerce boards (no longer active with new board), app/code/...


45

While I hope someone here comes up with an answer, I don't know that you'll find one. This table gets bulky for a lot of different reasons. Bugs in earlier (and possibly current) versions of Magento is one. Another is there's logic in this table that tries to track changes to the URL key value so that 301/302 rewrites are setup for old products. Because ...


41

NOTE: If you have changed the admin url by using the admin backend and lost access, use the steps here to regain access. How to properly change the Admin Base URL so you don't have to follow the above link. Never use the System=>Config=>Advanced=>Admin=>Admin Base URL settings to do this. It usually ends up in site fubar. Every local.xml has ...


30

We we're in the similar situation as you James. After a lot of digging this is what I came up with: The core_url_rewrite table is now deprecated, instead Magento EE 1.13 now stores the rewrites in enterprise_url_rewrite. Tables: enterprise_*_category_rewrite use catalog_*_entity_url_key tables to rebuild the two rewrite tables when you run php indexer.php -...


24

I would like to add a fix for this url rewrite indexer bug which has been developed at the bugathon in March 2013 and which has been further improved afterwards. It should solve this issue. As a reference, here is the patch file from the link: diff -rupN mage_org/app/code/core/Mage/Catalog/Model/Url.php src_shop/app/code/core/Mage/Catalog/Model/Url.php --- ...


23

You can use Regenerate a Url rewrites extension (it allow to regenerate a Url rewrites of products and categories) . To re-generate all Url rewrites of the categories/products in all stores (it support a multistores) run: $> bin/magento ok:urlrewrites:regenerate To regenerate Url rewrites in the specific store view (e.g.: store view id is "2"): $> ...


21

This module is been deprecated you can use this module instead Download Using Composer; composer require elgentos/regenerate-catalog-urls php bin/magento setup:upgrade Regenerate url for all products and the global store php bin/magento regenerate:product Regenerate url for products with id (1, 2, 3, 4) for store 1 php bin/magento ...


15

Typically this is caused because you have categories or products with duplicate urls. i.e a category with www.example.com/hats and a product with same url. Every time you save the product you will incrementally increase the core rewrite. The number you see at the end of your URL. The other main culprit is configurable products. Step 1 Make sure the ...


12

After you applied the patch posted by Simon, you can use the following query to remove junk data: DELETE FROM core_url_rewrite WHERE is_system <> 1 AND id_path REGEXP "^[0-9]+_[0-9]+$" AND (request_path REGEXP ".*-[0-9]*\.html" OR target_path = request_path); In contrast to Ashish Hira's query, this only effects URLs which have an ...


11

It sounds like a behavior which can happen if you do not have the ".htaccess" file by Magento or if the ".htaccess" file is messed up. Please try adding or replacing the current file with the default ".htaccess" file from Magento.


10

Id path is just a unique identifier for the url rewrites. It has no actual logic in the redirect itself. It is useful so you can mark certain rewrites for later use in the code. For example, the urls generated for product pages have the id path product/{product_id_here}. This way you can identify the product url rewrite via code. It is also useful if you add ...


9

Based on what I've seen messing around with EE 1.13 in a test environment and a quick little tests I just did, you should be able to simple truncate those tables and then manually rebuild all the URL indexes from the CLI. The *_cl tables are used in the TRIGGERS found on the catalog_product_entity_url_key table. The records they insert into these *_cl table ...


9

For the temporary solution I would suggest you the following step to perform Go to System ->Configuration On left hand side select General -> Web and under that you will find the Search Engines Optimization tab Use Web Server Rewrites => No I think your server does not having rewrite_module enable please check whether it is enabled or not. Also check that ...


9

you need to use store direct_url for that. e.g <a href="{{store direct_url='tipps'}}">Test</a>


8

I'd been thinking it in more complicated way but its so simple <global> <rewrite> <designer_url> <from><![CDATA[#^/author/id/#]]></from> <to><![CDATA[/designer/index/index/id/]]></to> <complete>1</complete> </designer_url> </...


8

Do not truncate: core_url_rewrite This is the worst advice ever, you will lose all customized SEO urls! Just dont do it! What worked for me was SSH and running: php -f ./shell/indexer.php -- -reindex catalog_url If nothing else works then maybe attempt the table dropping idea, but only as a last resort!


8

A huge amount of digging and I've found a single, tiny fix to get this to work. Essentially, this is a drawback of MySQL as a data medium. MySQL is typically case insensitive. The field that stores the request paths has a 'UNIQUE' constraint upon it, meaning it can only store one of the below: Category/ProductName.html Category/productname.html It treats ...


8

I currently use this to update the url keys of certain products: Update 'url_key' attribute through Magento Import Admin --> Products Catalog --> Select the products you imported the new url_key for --> Actions: Update Attributes --> Websites: Add to website You can just tick the website it is already assigned to. This way the product gets 'updated' and it ...


8

After debugging of couple of hours i have resolved this issue by following below method. I have override two files in my custom module, One is Product Url Model and Another one is Router Controller\Router Below is the di.xml <preference for="Magento\Catalog\Model\Product\Url" type="Vendor\ModuleName\Model\Url" /> <preference for="Magento\...


7

I tend to use the module Dn'D Patch Index URL for that and have very positive experiences with it. There's also the more up-to-date Loewenstark_UrlIndexer module that is supposed to do the same, but I haven't had time to test it yet.


7

The responsible model is Mage_Core_Model_Url_Rewrite which has several possible methods to load: $rewrite = Mage::getModel('core/url_rewrite')->loadByRequestPath($path) $rewrite = Mage::getModel('core/url_rewrite')->loadByIdPath($path) and the usual $rewrite = Mage::getModel('core/url_rewrite')->load($id) And then it's a standard attribute getter: ...


6

I've implemented the accepted answer with success. On another Magento install I needed to preserve some custom rewrites so I deleted all entries that ended in a - and then a number up to 5 digits long with: DELETE FROM `core_url_rewrite` WHERE `request_path` REGEXP '\\-[0-9]{1,5}$'; This mostly worked but I still get 2 more rows on each re-index. Not sure ...


6

Since this is not yet mentioned in this thread, I wanted to share the cool news that this issue is fixed in Magento 1.9.3.9 and later. See the related release notes: Magento no longer performs unnecessary write operations on the core_url_rewrite table. So all fixes for this issue mentioned here are not necessary when using a version of Magento greater or ...


6

In Magento Enterprise the is a new module for storing url rewrite Enterprise_UrlRewrite. This module contains new tables for storing the rewrites, some layout files for the admin section, a new admin html controller and a new url matcher to name but a few items. To understand when the enterprise system uses the new tables for saving rewrites we can first ...


6

Depending on what you are trying to do, you have a few different options here. The first and probably easiest if you are not a developer is to use Magento's built in Rewrite Management (under Catalog at the top in admin). You will probably want to create a custom rewrite, and then depending on what you select under Redirect you will create either a rewrite ...


6

This is a Classic issue with rewrites. The root cause is not having unique URL keys. Typically caused by having simple products part of configurable with the same name. For obvious reasons, one request path (URL) must match one action in Magento. Therefore all request paths need to be unique. Product and category URL paths are created from their URL keys ...


6

To answer your questions: 1. What exactly do Web Server Rewrites do? I believe they just remove the index.php from the url? How important are they? Correct, the remove the index.php for the URL to give you pretty URLs. Most modern websites and shops use them and I would recommend to do so. 2. Should this option be checked when using NGINX? Do Magento Web ...


6

Take a look at Mage_Core_Model_Url_Rewrite class. This class provides a loadByRequestPath($path) method which seems to be what you need So, code would be... //$path is your request_path $rewrite = Mage::getModel('core/url_rewrite')->loadByRequestPath($path); if ($rewrite->getId()){ // rewrite exists $rewrite->delete(); } Other way could ...


6

Download "Regenerate Url rewrites" extension from here : https://github.com/olegkoval/magento2-regenerate_url_rewrites Follow the below steps MANUAL INSTALLATION Extract files from an archive Create a app/code/OlegKoval/RegenerateUrlRewrites folder in magento root directory, and copy the extracted files from Step1 folder and upload it to directory app/...


6

First thing you need to understand is that: for a webserver, both the owner and normal site visitors are the same. There is no default mechanism to identify a "Site owner". To achieve your goals, you can do below: Cpanel: Restrict the cpanel access from one or more IPs only. Or run cpanel on a different port which the normal users can't guess. Hope this ...


Only top voted, non community-wiki answers of a minimum length are eligible