Domain Default Redirection
Categories
Component ID
2012108
Component name
Domain Default Redirection
Component type
module
Maintenance status
Development status
Component security advisory coverage
covered
Downloads
2455
Component created
Component changed
Component body
This small module provides a redirection feature instead of providing the default domain contents in the Domain Access suite.
In a nutshell, subdomain redirection handling will be shifted from your domain's DNS settings to your Drupal installation, redirecting all subdomains to the specified URL while still serving Drupal content to the subdomains set in Domain Access.
Requirements
- Domain Access
- A subdomain wildcard record in your DNS settings. Otherwise all subdomains won't even make it to your Drupal installation...
How to set up
To set up this module, go to the global Domain settings page at admin/structure/domain/settings
. There will be an extra textfield on top of the form in which you can enter the URL.
Example use case
- Subdomain wildcard DNS record: *.example.com pointing to /public_html/my_website
- Domain Access setup: test.example.com has customized settings.
- Domain Default Redirection setup: if requested domain not found in Domain Access, then redirect to http://drupal.org
The table below shows the results of this setup compared with some standard cases:
Requested URL | Domain Access + test.example.com DNS |
Domain Access + test.example.com & test2.example.com DNS |
Domain Access + DNS wildcard |
Domain Access + Domain Default Redirect + DNS wildcard |
---|---|---|---|---|
test.example.com (set in Domain Access) |
Customized | Customized | Customized | Customized |
test2.example.com (not set in Domain Access) |
HTTP 404 | Defaults | Defaults | Redirection |
ANYTHING.example.com (not set in Domain Access) |
HTTP 404 | HTTP 404 | Defaults | Redirection |