How to remove products url for specific Category URL-REWRITEOptimize catalog product url rewriteURL rewrite for category in layered navigation to external URLMagento 2 URL rewrite IndexHow Magento 2 url rewrite works?How to remove parent category from subcategory URL?How can i rewrite my category url for redirect new siteMagento 2 Rewrite Category to CMS Page?Remove random number from rewrite urlIs Possible Main Category URL Rewrite Management?Magento 2 query url rewrite
How to find location on Cambridge-Mildenhall railway that still has tracks/rails?
Where are the rest of the Dwarves of Nidavellir?
Alphanumeric Line and Curve Counting
Do dragons smell of lilacs?
Did Voldemort kill his father before finding out about Horcruxes?
Is this Android phone Android 9.0 or Android 6.0?
What details should I consider before agreeing for part of my salary to be 'retained' by employer?
Is it rude to refer to janitors as 'floor people'?
Why do space operations use "nominal" to mean "working correctly"?
Increasing muscle power without increasing volume
What were the problems on the Apollo 11 lunar module?
How many bits in the resultant hash will change, if the x bits are changed in its the original input?
How can I help our ranger feel special about her beast companion?
Why is the total probability theorem expressed in this way?
Is the purpose of sheet music to be played along to? Or a guide for learning and reference during playing?
Cauchy reals and Dedekind reals satisfy "the same mathematical theorems"
How to color a tag in a math equation?
Optimising the Selection of MaxValue in Association
Migrating Configuration - 3750G to 3750X
Credit card details stolen every 1-2 years. What am I doing wrong?
Is it okay for a chapter's POV to shift as it progresses?
Generating a PIN from cryptographic bytes
Which GPUs to get for Mathematical Optimization (if any...)?
Why is Google approaching my VPS machine?
How to remove products url for specific Category URL-REWRITE
Optimize catalog product url rewriteURL rewrite for category in layered navigation to external URLMagento 2 URL rewrite IndexHow Magento 2 url rewrite works?How to remove parent category from subcategory URL?How can i rewrite my category url for redirect new siteMagento 2 Rewrite Category to CMS Page?Remove random number from rewrite urlIs Possible Main Category URL Rewrite Management?Magento 2 query url rewrite
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;
I want to remove url of prodcuts for a specific category. How can i remove specific category URL-REWRITE? using Query pro-grammatically
magento2 products url-rewrite
add a comment |
I want to remove url of prodcuts for a specific category. How can i remove specific category URL-REWRITE? using Query pro-grammatically
magento2 products url-rewrite
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
1
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47
add a comment |
I want to remove url of prodcuts for a specific category. How can i remove specific category URL-REWRITE? using Query pro-grammatically
magento2 products url-rewrite
I want to remove url of prodcuts for a specific category. How can i remove specific category URL-REWRITE? using Query pro-grammatically
magento2 products url-rewrite
magento2 products url-rewrite
edited Jul 9 at 6:20
Asad Ullah
asked Jul 9 at 5:58
Asad UllahAsad Ullah
42613 bronze badges
42613 bronze badges
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
1
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47
add a comment |
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
1
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
1
1
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47
add a comment |
2 Answers
2
active
oldest
votes
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('url_rewrite');
try
$sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%id/234'";
$connection->query($sql);
catch(Exception $e)
echo 'Message: ' .$e->getMessage();
here in querry target_path (%id/234) defines your category
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
add a comment |
You can use this command to delete product URL for specific category
DELETE FROM url_rewrite WHERE target_path LIKE 'catalog/product/view/id/[PROD_ID]/category/[CAT_ID]'
where PROD_ID
is your product id, and CAT_ID
is the ID of category from which you need to delete URL.
add a comment |
Your Answer
StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "479"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);
else
createEditor();
);
function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);
);
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281288%2fhow-to-remove-products-url-for-specific-category-url-rewrite%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('url_rewrite');
try
$sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%id/234'";
$connection->query($sql);
catch(Exception $e)
echo 'Message: ' .$e->getMessage();
here in querry target_path (%id/234) defines your category
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
add a comment |
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('url_rewrite');
try
$sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%id/234'";
$connection->query($sql);
catch(Exception $e)
echo 'Message: ' .$e->getMessage();
here in querry target_path (%id/234) defines your category
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
add a comment |
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('url_rewrite');
try
$sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%id/234'";
$connection->query($sql);
catch(Exception $e)
echo 'Message: ' .$e->getMessage();
here in querry target_path (%id/234) defines your category
$objectManager = MagentoFrameworkAppObjectManager::getInstance();
$resource = $objectManager->get('MagentoFrameworkAppResourceConnection');
$connection = $resource->getConnection();
$tableName = $resource->getTableName('url_rewrite');
try
$sql = "DELETE FROM `url_rewrite` WHERE `entity_type` LIKE 'category' AND `target_path` LIKE '%id/234'";
$connection->query($sql);
catch(Exception $e)
echo 'Message: ' .$e->getMessage();
here in querry target_path (%id/234) defines your category
answered Jul 10 at 5:51
Asad UllahAsad Ullah
42613 bronze badges
42613 bronze badges
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
add a comment |
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
1
1
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
Good to know that you have resolved it. +1 :)
– Shoaib Munir
Jul 10 at 6:02
1
1
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
thanks for your help man
– Asad Ullah
Jul 10 at 7:28
add a comment |
You can use this command to delete product URL for specific category
DELETE FROM url_rewrite WHERE target_path LIKE 'catalog/product/view/id/[PROD_ID]/category/[CAT_ID]'
where PROD_ID
is your product id, and CAT_ID
is the ID of category from which you need to delete URL.
add a comment |
You can use this command to delete product URL for specific category
DELETE FROM url_rewrite WHERE target_path LIKE 'catalog/product/view/id/[PROD_ID]/category/[CAT_ID]'
where PROD_ID
is your product id, and CAT_ID
is the ID of category from which you need to delete URL.
add a comment |
You can use this command to delete product URL for specific category
DELETE FROM url_rewrite WHERE target_path LIKE 'catalog/product/view/id/[PROD_ID]/category/[CAT_ID]'
where PROD_ID
is your product id, and CAT_ID
is the ID of category from which you need to delete URL.
You can use this command to delete product URL for specific category
DELETE FROM url_rewrite WHERE target_path LIKE 'catalog/product/view/id/[PROD_ID]/category/[CAT_ID]'
where PROD_ID
is your product id, and CAT_ID
is the ID of category from which you need to delete URL.
answered Jul 9 at 6:05
Shoaib MunirShoaib Munir
5,2886 gold badges23 silver badges69 bronze badges
5,2886 gold badges23 silver badges69 bronze badges
add a comment |
add a comment |
Thanks for contributing an answer to Magento Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f281288%2fhow-to-remove-products-url-for-specific-category-url-rewrite%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Did you resolve your query?
– Shoaib Munir
Jul 9 at 12:48
1
yes i done that let me past my answer
– Asad Ullah
Jul 10 at 5:47