I’m running a Joomla 5-based multilingual website and facing an issue with redirection from the main domain (www.bioscience.com.pk) to the English version of the site (www.bioscience.com.pk/en/). Below are my current settings and the problem I am encountering:
Website Setup:
Homepage with ‘language all’:
Alias: home
English homepage:
Language: English
Alias: en
Urdu homepage:
Language: Urdu
Alias: ur
Problem:
When users visit www.bioscience.com.pk, they are automatically redirected to the English version at www.bioscience.com.pk/en/. However, I would like visitors who access www.bioscience.com.pk to land on the homepage set to ‘language all’ without any redirection.
My Current Language Filter Settings:
Language Selection for new Visitors: Site language
Automatic Language Change: No
Item Associations: Yes
x-default Language: Default frontend language
Remove URL Language Code: No
What I Want:
I don’t want the site to redirect users from www.bioscience.com.pk to www.bioscience.com.pk/en/. Instead, I’d like them to stay on the www.bioscience.com.pk homepage (set to 'language all').
To prevent users from being automatically redirected from your main domain (www.bioscience.com.pk) to the English version (www.bioscience.com.pk/en/) while still allowing them to access the homepage set to ‘language all’, you can follow these steps:
1. Check Language Filter Settings
It seems your current settings might be causing the redirection. Here’s what you can try:
Language Selection for New Visitors: Change this setting to “All languages” if available. This should allow users to land on the homepage without being redirected based on their browser’s language settings.
2. Review Menu Item Associations
Ensure that your homepage menu item (the one with ‘language all’) is correctly set and published.
Check that the homepage menu item is not set to “Redirect” or linked to the English version in any way.
3. Disable Automatic Redirection
If your settings do not resolve the issue, you might have a plugin or an override causing the automatic redirection:
Check for Plugins: Look for any language-related plugins or third-party extensions that might enforce this redirection. Disable them one by one to see if the issue resolves.
4. Custom Code in .htaccess
If the redirection persists, you might need to check your .htaccess file for any rules that force the redirect. If you find any rules that redirect traffic to /en/, comment them out or remove them.
5. Modify the Language Settings in Joomla
Go to System > Global Configuration > Language and ensure that the language filter settings are not overriding your homepage.
Make sure the “Remove URL Language Code” setting is set to No, which you’ve already done. This prevents Joomla from enforcing language codes in the URL.
6. Use a Joomla Extension
Consider using a Joomla extension specifically designed for language management. Some extensions allow for more granular control over language redirection and selection.
7. Clear Cache
After making these changes, make sure to clear both the Joomla cache and your browser cache to see the effects of your modifications.