3

I have to Create a Custom Module for product attribute filter URL rewrite. registration.php <?php \Magento\Framework\Component\ComponentRegistrar::register( \Magento\Framework\Component\ComponentRegistrar::MODULE, 'Custom_Seo', __DIR__ ); module.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-...


2

Use below code to Pass parameter $id=123 $currency = 'GBP'; $parameter = ['id' => $id, 'currency' => $currency]; $resultRedirect->setPath('frontname/path/controllername', ['params' => $parameter]);


2

Url rewrites are working in a default Magento environment for external redirects, too. You can redirect almost every path of your store that way, because the check for redirects is done before other Magento routers come into action. Therefore the rewrite in the below screenshot will do the redirect for your example.


2

This can be caused by duplicate entries for the same product in url_rewrite database table. You can check duplicate entries using below query. SELECT * FROM url_rewrite WHERE entity_type = 'product' To resolve your issue Follow this link I hope it helps.


2

After so much debugging, I've found an alternative solution for this issue by creating a custom module to generate the URL rewrite while creating/editing a product from Admin. Create Vendor/UrlRewriteFix/etc/adminhtml/di.xml and define the plugin class Magento\Catalog\Model\Product in the file. <?xml version="1.0"?> <config xmlns:xsi="http://www....


2

I went ahead and added my index on entity_id. It made a significant difference for my custom import that relied only on entity_id lookups and found no other downsides in the last 3 months.


2

You can add a custom Router class to match your criteria and then redirect to your desired path app/code/Vendor/ModuleName/etc/di.xml <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd"> <type name="Magento\Framework\App\...


1

It was not there in 2.3 when I needed it. I think they have now removed the config to not regenerate on save... as this was recommended never to be off. I had speed issues with my script to fix and with some modules I tried. elgentos/regenerate-catalog-urls is the module to use being fast, flexible and reliable. From the readme... This extension ...


1

We can configure it by URL Rewrites Go to Magento 2 Admin -> Marketing -> SEO & Search -> URL Rewrites Find the path by searching Request path column. Remove the cache php bin/magento cache:clean. Refresh the front-end, click the main menu category then you can see the configured path. Example I have modified. Request path men/tops-men/tees-men.htm ...


1

Referring to question - Magento 2 - Homepage is 404 See if there are any records missing value for request path using below query: SELECT * FROM `url_rewrite` WHERE request_path=''; Either remove those records or update with valid values.


1

For above my problem, I seem to have found my solution for that after too much googling. I have used below extension which is free. https://github.com/elgentos/regenerate-catalog-urls for that particular products i have regenerate product urls again.It working for me correctly.


1

You can manage URL rewrites in Marketing -> (SEO & Search) -> URL rewrites please see Magento docs for more information.


1

You can try this for run OlegKoval command in observer $output = shell_exec('php bin/magento cache:clean'); you can change your command in this, you can try below code in observer file $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface'); $...


1

To fix it I ran this SQL query below. SELECT * FROM `url_rewrite` WHERE `request_path` LIKE '%html.html' AND `redirect_type` LIKE '0'; UPDATE `url_rewrite` SET request_path = REPLACE(request_path, '.html.html', '.html') WHERE `request_path` LIKE ('%html.html') AND `redirect_type` LIKE '0'; Or you can install the Elgento module and run its commands as ...


1

$objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $resource = $objectManager->get('Magento\Framework\App\ResourceConnection'); $connection = $resource->getConnection(); $tableName = $resource->getTableName('url_rewrite'); try { $sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `...


1

You can do it with the help of url rewrite in magento 1 and 2 both . In magento 2 On the Admin Panel, go to Marketing > SEO & Search> URL Rewrites Add url rewrite where you can give the request path and the target path. Clear cache and run indexing then check the path. Hope it helps!


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