noon / 隐藏默认商店代码
Magento 2模块,用于隐藏默认商店代码
1.0.6
2023-06-26 18:27 UTC
Requires
- magento/framework: >=100.0
- magento/magento-composer-installer: *
- magento/module-backend: >=100.0
- magento/module-store: >=100.0
README
Magento 2模块,用于从URL中隐藏默认商店代码。
https://bender.kr.ua/howto-hide-default-store-code-from-url-magento-2/
安装
手动
- 下载ZIP文件并解压到 app/code/Noon/HideDefaultStoreCode。如果此路径不存在,请在Magento2根目录下创建。
- 在Magento2根目录下运行以下命令
php bin/magento setup:upgrade
composer
- 在Magento2根目录下运行以下命令
composer require noon/hide-default-store-code php bin/magento setup:upgrade
配置
启用/禁用
商店 > 配置 > 一般 > 网络 > URL选项 > 隐藏默认商店代码
重定向
商店 > 配置 > 一般 > 网络 > URL选项 > 自动重定向到不带商店代码的URL