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?
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | i18n_context_redirect.zip | 1.82 KB | Wolfgang Reszel |
Comments
Comment #1
johnzzonI'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 tohttp://example.com/sv/enas described by Wolfgang Reszel.Comment #2
scribbler commentedNot 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.dewith two languages /de and /en as folder prefixes. German is default, so a normal article will be found withwww.example.de/de/my-german-articleorwww.example.de/my-german-articleThere are some old html-pages in the root directory i want to redirect:
www.example.de/old-article.htmlSo 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.
Comment #3
jmix commentedi 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).
Comment #4
Wolfgang Reszel commentedWell, I created a small module for my use case. I don't know of any side effects.
Comment #5
valderama commentedI sounds like you are having the same issues as I had. I posted a patch over here: http://drupal.org/node/1983444
Comment #6
mxtOnly to inform you people that patch provided by Valderama in #5 does its job and resolves all the above issues
Comment #7
pere orgaThen let's close this as a duplicate of #1983444: Make source paths (= "From") work without language prefix, which is already RTBC.
Comment #8
pere orga