This thread is resolved. Here is a description of the problem and solution.
Problem: Disable root page for language
Solution: While using Directory for the default language option of WPML Language URL format we have to do the following steps to disable the root page for the site.
1) Create a new PHP file *root-page.php* and place it in the *Root folder* of the site
2) Add the following code in the *root-page.php* file and save the changes
<?php header('Location: http://www.yoursite.host/en'); ?>
3) Visit WPML>>Languages>>Language URL format
4) Add *root-page.php* as the value for *HTML file* field of *Use directory for default language* option
5) Save the settings
6) Visit Settings>>Permalinks and resave the settings
Relevant Documentation: https://wpml.org/documentation/getting-started-guide/language-setup/directory-default-language/#selecting-an-html-file
https://wpml.org/forums/topic/disable-root-page-for-language/#post-11189877
This is the technical support forum for WPML - the multilingual WordPress plugin.
Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.
This topic contains 2 replies, has 2 voices.
Last updated by ernestC-2 1 year, 11 months ago.
Assisted by: Bigul.