Hi!
I have tested with clean 6.15 Drupal Install.
Installed contributed modules:only domain access and domain configuration.
The settings.php have the include line to settings.inc
domains: testdomain1, testdomain2
with Apache config:
ServerAdmin admin@localhost
DocumentRoot /hp/domaintest
ServerName testdomain1
ServerAlias testdomain2
ErrorLog logs/domaintest-error_log
CustomLog logs/domaintest-access_log common
.htaccess is default to D6.15.
nodes:
node/1 (all affiliate, published to testdomain1, set frontpage of testdomain1)
node/2 (published to testdomain2, set frontpage of testdomain2)
node/3 (all affiliate, published to testdomain1)
On Domain Access settings page (admin/build/domain/settings) in Advanced settings field set "Rewrite all URLs to point to a single source" to checked and set "Default source domain:" to "testdomain1".
The bug:
Navigate now with Anonymous user to "http://testdomain2/node/2" or "http://testdomain2/node/3" and the domain do not change to testdomain1, the rewrite not work.
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | domain_adv.module_SEO_redirect.patch | 2.33 KB | ibis |
Comments
Comment #1
ibis commentedSEO URL rewrite work fine, but how can i _redirect_ all affiliate nodes to own (or default) source domain?
Comment #2
nonsieEnable Domain Source
Comment #3
agentrickardDomain Source will change the links, but not issue redirects. There is a module in the queue somewhere that does actual redirects instead of access denied if you reach the node from the wrong domain.
All affiliates also has a default domain setting. See section 4.4.3 Default Source Domain in README.txt.
Comment #4
agentrickardComment #5
ibis commentedThe code:
work fine, also combined with domain_source is perfect. No more duplicated content and 403!, all content redirected to own domain.
Comment #6
tranquille commentedcould you provide a patch - or a detailed explanation.
Where do you add the two lines of code?
thanks
Comment #7
ibis commentedI used that yet in domain_adv.module in domain_adv_node_access() function. But soon with drupal_goto() not with domain_goto(), because with drupal_goto can i make type 301 redirect. Here is the patch to the original drupal_adv.module.
Comment #8
IckZ commentedHey,
great patch. I searched a lon tim to find this! You should say, that this patch must be applid to the advanced domain module.
Temporarly I have the Problem that paths aren't redirected.. For example: domain1.de/user/1 is not redirected to domain2.de/user/2 instead this node (content profile) is assigned to domain2...