iqual/iq_multidomain_extensions
最新稳定版本:v3.1.2
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; }
统计信息
- 总下载量: 13.38k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-2.0
- 更新时间: 2022-07-19