My default language is German and I always use prefixes.

When accessing www.domain.com/products/product Drupal will redirect to the default language www.domain.com/de/products/product.

I want www.domain.com/products/product to be redirected to www.domain.com/en/gorgeous-products/new-product which is at node/123. As Drupal first redirects to the default prefix, I have to redirect from German or All languages. But I can't change the language context with the Redirect module. It will redirect me to www.domain.com/de/node/123. Using /en/node/123 will redirect to www.domain.com/de/en/node/123.

What is going wrong? I tried to disable all other redirection modules, but it does not help.

When I redirect to a node url shouldn't the language context be switched to the node's language?

CommentFileSizeAuthor
#4 i18n_context_redirect.zip1.82 KBWolfgang Reszel

Comments

johnzzon’s picture

I'm in a similar position. Having upgraded an old site to Drupal, I want to redirect an old path which no longer exists to the english frontpage. Swedish is the default language though, so it will only redirect to the swedish frontpage. Even if I set a complete URL http://example.com/en, the module seems to be a wee bit too clever and only leaves "en" in the field. This redirects to http://example.com/sv/en as described by Wolfgang Reszel.

scribbler’s picture

Version: 7.x-1.x-dev » 7.x-1.0-beta4
Category: bug » support

Not sure, if i have the same issue but it seems very likely and i couldn't find any helping ressources yet. This is my issue:

Domain www.example.de with two languages /de and /en as folder prefixes. German is default, so a normal article will be found with
www.example.de/de/my-german-article or www.example.de/my-german-article

There are some old html-pages in the root directory i want to redirect:
www.example.de/old-article.html

So i created a redirect 'old-article.html' -> 'new-article' but this will not be redirected. 'www.example.de/old-article.html' shows the old page. I tried 'www.example.de/de/old-article.html' and this is redirected to the new page in Drupal. It seems the language-prefix 'de/' is not shown in the redirect 'From' field, but is internally used. How can i get this to work? Is something misconfigured? Is it impossible?

Thanks for every help.

jmix’s picture

i have the exact same problem of double prefix in the urls.

trying to redirect:
www.exemple-old.com/page.php?lang=fr
to
www.exemple-new.com/fr/page
outputs
www.exemple-new.com/es/fr/page (with "es" being my default language).

Wolfgang Reszel’s picture

StatusFileSize
new1.82 KB

Well, I created a small module for my use case. I don't know of any side effects.

valderama’s picture

I sounds like you are having the same issues as I had. I posted a patch over here: http://drupal.org/node/1983444

mxt’s picture

Only to inform you people that patch provided by Valderama in #5 does its job and resolves all the above issues

pere orga’s picture

Issue summary: View changes

Then let's close this as a duplicate of #1983444: Make source paths (= "From") work without language prefix, which is already RTBC.

pere orga’s picture

Status: Active » Closed (duplicate)