0

I have a store view:

 - Default
 - First store
 - Second store

The second store has a problem with the categories

First store - its URL looks like this: firststore.com/category-name/

when i go to the category Second store - its URL looks like this: secondstore.com/directory/category/view/s/category-name/id/111/

URL modules that should work with categories do not work correctly on the second store, tell me how to convert URLs to secondstore.com/category-name/

0

In magento2 all url rewrite can be see on table url_rewrite

(
    url_rewrite_id   int unsigned auto_increment comment 'Rewrite Id'
        primary key,
    entity_type      varchar(32)                 not null comment 'Entity type code',
    entity_id        int unsigned                not null comment 'Entity ID',
    request_path     varchar(255)                null comment 'Request Path',
    target_path      varchar(255)                null comment 'Target Path',
    redirect_type    smallint unsigned default 0 not null comment 'Redirect Type',
    store_id         smallint unsigned           not null comment 'Store Id',
    description      varchar(255)                null comment 'Description',
    is_autogenerated smallint unsigned default 0 not null comment 'Is rewrite generated automatically flag',
    metadata         varchar(255)                null comment 'Meta data for url rewrite',
    constraint URL_REWRITE_REQUEST_PATH_STORE_ID
        unique (request_path, store_id)
)

sometimes the easiest way is to manipulate the record this 3 column that you need to modified entity_id, request_path, store_id

after that you need to reindex

php bin/magento indexer:reindex

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.