I want to create a redirect from »https: // domain.tld/page« to »https: // domian.tld/de/parent/page.html« but this doesn’t work. It always create a source url including country code »https: / /domain.tld/de/page«.
On my /en/ context it works without the country code. Perhaps because the /de/ is the default context (web)?
What do you mean by “It always create a source url”? The blue part (<span class="x-grid-span">
) that is shown in the grid of redirects in the column “Old URL”?
What exactly did you enter in the field “Old URL” when creating the redirect?
As far as I can tell, when you enter page
for “Old URL”, then this is exactly what is stored in the database table modx_seosuite_redirect
.
yes, the blue part. I did following:
- I open the »Search engine« tab of the the page I want to redirect to.
- Clicked on »New URL redirect«
- enter in the field »old URL« just the name like »sustainability«.
- A redirect will be created, but as you recognized correctly with the »/en/« in the blue part »https: // domain.tld/en/«, followed by the word »sustainability«.
I think it’s because of the context settings. All my language pages starts with »/en/« or »/de/«
Instead of using the »Search engine« tab of the page you want to redirect to, try adding the redirect in the “SEO Suite” CMP.
- In the top menu of the manager choose “Extras” → “SEO Suite”
- Change to the tab “URL redirect”
- Click “New URL redirect” and enter the data (you can use an integer for “New URL”)
This way the column “context_key” of the database table doesn’t get fill and the blue part should just show */
.
If this still doesn’t work, then please post the “friendly URLs part” of your .htaccess
-file and the plugin/router you use to switch between your contexts (XRouting,LangRouter).
Thanks a lot. This works without any problem.