293453: Wildcard DNS - default domain introduced a rather ugly case: not being able to access one's test/devel domain.
We use OTAP, meaning different domains for development, testing, Acceoptance and Production. While on production the redirect introduced in #293453 may be good (arguable), for dev and test it certainly is not.
Issue #1: I was developing and chagning some settings in devel. but. without notice I was redirected to the LIVE site. So instead of disabling some module on test, I actually did that on live! My fault, I should havve taken notice of the addressbar, but being unaware of this feature, I did not know. Minor issue with a large impact.
Issue #2: No longer being able to change any settings on the devel site. I had to manually comment the drupal_goto in the source of domain module in order to disable the module alltogether on development urls.
issue #3: All urls, inclduding other-example.com/foo/bar lead to example.com. instead of example.com/foo/bar. Users who land on the wrong domain are always erdirected to the Homepage, not to the path they gave.
I would like to discuss a way to disable this feature alltogether. In all our cases we want, nor need this feature.
But I expect a toggel for this option to be a) a usability issue and b) a performace issue.
Thoughts?
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 321071-settings.patch | 5.94 KB | agentrickard |
| #6 | 32107_wildcard_dns_redirect_settings_02.patch | 2.52 KB | Bèr Kessels |
| #3 | 32107_wildcard_dns_redirect_settings.patch | 1.02 KB | Bèr Kessels |
Comments
Comment #1
agentrickardDomain Alias fixes this problem but removing this behavior entirely and allowing redirects on a per-alias basis, but is currently for D6 and needs to be backported. (With domain_alias, you simply say "yes, redirect *.example.com to example.com unless it matches another registered domain.)
Making this a setting is fine by me -- though we have lots of settings already.
Line 57ff of domain.module would become something like so:
That patch should work for you right now.
Comment #2
Bèr Kessels commentedWould
$options = array('-1' => t('Do not change domain'));(line 281ff) not be best used for this?Somehow it does not show up on my main site. Which makes me think that there is something else going wrong there.
I would expect t('Do not change domain') to be the setting that disabled automatic redirects.
If so, then I best change above code into
Comment #3
Bèr Kessels commentedAnd abovementioned change in a patch.
Comment #4
agentrickardPossibly. I am deep in development on the D6 version, so this is not really getting my attention.
I don't think that is what 'default_domain_source' is designed for, so using it in that way may confuse people. That's why I think a separate setting is in order.
Comment #5
Bèr Kessels commentedThis patch contains the requested separate setting.
Comment #6
Bèr Kessels commented.. nope. this patch...
Comment #7
agentrickardI will test this for D5, since I may need it now.
Comment #8
agentrickardI have split this patch into two parts. One part controls the redirect setting. The other controls the display of the message indicating that a redirect has taken place.
Be default, both are set to TRUE, which is the current behavior.