iqual / iq_multidomain_extensions
Support for multidomain.
Installs: 5 910
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 3
Forks: 2
Open Issues: 3
Type:drupal-custom-module
Requires
- php: ^8.1
- drupal/core: ^9.5 || ^10
- drupal/domain: 2.0.0-beta1
- drupal/robotstxt: ^1.5
- drupal/xmlsitemap: ^1.1
- 3.x-dev
- 3.0.5
- 3.0.4
- 3.0.3
- 3.0.2
- 3.0.1
- 3.0.0
- 2.x-dev
- 2.5.2
- 2.5
- 2.4
- 2.3.1
- 2.3
- 2.2.1
- 2.2
- v2.1
- v2.0
- v0.7
- v0.6
- v0.5
- v0.4
- v0.3.1
- v0.3
- v0.2
- 0.1
- dev-DUP-71-xmlitemap-mixed-language-negotiation
- dev-issue/HR-241-xmlsitemap-prefixes
- dev-issue/DUP-61_xmlsitemap_domain_access
- dev-8.x-1.x
- dev-misc/bugfixing
- dev-issue/seo-optimizations
This package is auto-updated.
Last update: 2024-10-29 09:58:55 UTC
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
www
or non-www
domain 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; }