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.

CommentFileSizeAuthor
#7 domain_adv.module_SEO_redirect.patch2.33 KBibis

Comments

ibis’s picture

Category: support » feature
Status: Closed (duplicate) » Active

SEO URL rewrite work fine, but how can i _redirect_ all affiliate nodes to own (or default) source domain?

nonsie’s picture

Title: SEO URL rewrite not work » SEO URL redirect
Category: bug » feature

Enable Domain Source

agentrickard’s picture

Domain 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.

agentrickard’s picture

Category: feature » support
Status: Active » Closed (duplicate)
ibis’s picture

Category: feature » support
Status: Active » Closed (duplicate)

The code:

$target = domain_get_node_match($node->nid);
domain_goto($target);

work fine, also combined with domain_source is perfect. No more duplicated content and 403!, all content redirected to own domain.

tranquille’s picture

could you provide a patch - or a detailed explanation.
Where do you add the two lines of code?
thanks

ibis’s picture

StatusFileSize
new2.33 KB

I 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.

IckZ’s picture

Hey,
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...