we have set our page to use subdirectories for languages (for now just /de/) and redirected the homepage hidden link with the root page redirect template to hidden link. This is working fine.
Now here's the problem:
All other existing pages of our website, like hidden link are not automatically redirected to the /de/ subdirectory.
So now we have two pages with the same content: hidden link -> which should be redirected and hidden link
I'm quite sure that this was working a few weeks ago. Any ideas on how to fix this without setting manual redirects for every page?
Thank you for contacting WPML support, I'd be happy to help you with this issue.
Now I see the page is redirected to hidden link correctly. Please check this screen record hidden link
According to the Debug info, I see the default language on your site is German and the option "Use directory for default language" is enabled in WPML > Languages > Language URL format. So no need to set up a direct for pages and posts on your site. The permalink of them should be hidden link
You can test this feature on a clean installation of WordPress. With this link, you will be logged in directly to a sandbox site hidden link
thanks for your reply and the sandbox page. On our website I created the redirects manually in the meantime. That's why it is working there. But the problem still exists.
I did the same setup on the sandbox site and I get the same issue:
I created a test page: hidden link -> Permalink is fine
But hidden link is not redirected to hidden link
I see that behavior and I think it is normal. Posts without language information are accessible from anywhere. Actually, WPML does not generate a link without language on your site, you are typing the page without language directly in the browser.
The canonical and hreflang tags also point to the URL hidden link
please check this screenshot hidden link
That means the search engine or other plugins can see the URL hidden link only.
I hope that makes sense.
The topic ‘[Closed] Redirect of subpages to default language folder not working’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.