iqual/iq_multidomain_extensions
Composer 安装命令:
composer require iqual/iq_multidomain_extensions
包简介
Support for multidomain.
README 文档
README
Contains extensions, config etc. for a multidomain setup
Installation guide
-
Install iq_multidomain_extensions
-
add domain records /admin/config/domain
IMPORTANT NOTES
- Make sure that the pattern ids and template names have to be identical (Pay attention to - and _)
Upgrade from 2.x
With Drupal 10, domain_site_settings and domain_theme_switch are deprecated and are replaced by domain_config. This causes breaking changes.
- Upgrade to 2.5.y and run update hooks. This will convert favicons and robotstxt settings to use domain_config.
- Recreate theme selection per domain at /admin/appearance if iq_multidomain_domain_theme_switch was used before.
- Remove domain_site_settings and domain_theme_switch from the project
- Upgrade to 3.x
Theme per domain
Install the iq_multidomain_domain_theme_switch submodule:
drush en iq_multidomain_domain_theme_switch
Go to /admin/appearance to select the theme per domain.
Notes
- The sub module prefixes pattern ids from selected themes with the theme name (except for the global default theme).
- All themes need the same patterns to commonly use views.
- Autogenerated domain specific references to patterns might include the theme name and need to be adjusted on selecting or renaming a theme.
XML Sitemaps per domain
Install the iq_multidomain_sitemap_extension submodule:
drush en iq_multidomain_sitemap_extension
Go to /admin/config/search/xmlsitemap to add sitemaps. On each sitemap, there's a new field available to set the domain.
Favicon
The "iq_multidomain_favicon_extension" has been removed.
Robots.txt
If you want to register a robots.txt file per domain,
you must activate iq_multidomain_robotstxt_extension.
Install it with
drush en iq_multidomain_robotstxt_extension
Once installed, robots.txt can be configured at /admin/config/search/robotstxt.
Additionally incoming public requests have to be passed to the module (i.e. PHP)
on either the /robots or /robots.txt path.
Kubernetes nginx ingress setup
You also need to add the following annotation to all main domain ingresses:
nginx.ingress.kubernetes.io/configuration-snippet: |- location = /robots.txt { rewrite ^ /robots last; }
It is also advised to enable the www-redirect option and to not set the
wwwor non-wwwdomain in the ingress respectively. (i.e.nginx.ingress.kubernetes.io/from-to-www-redirect: "true")
This rewrites incoming requests to robots.txt to the correct dynamic endpoint
(/robots) bypassing any existing robots file.
Nginx example
If you want to pass the request to php directly in your application nginx, you can use an approach like this:
location = /robots.txt { rewrite ^ /index.php last; }
iqual/iq_multidomain_extensions 适用场景与选型建议
iqual/iq_multidomain_extensions 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 22.18k 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 07 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 iqual/iq_multidomain_extensions 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 iqual/iq_multidomain_extensions 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 22.18k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 15
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2022-07-19