So the "www.abcalphapourlavie.ca" goes to the French version of the site, however with just "abcalphapourlavie.ca" (no www) it goes to the English URL, which is hidden link
We tried the solutions in the above support ticket but they didn't seem to work for us.
Here is the WordPress section of our .htaccess file:
# BEGIN WordPress
# The directives (lines) between `BEGIN WordPress` and `END WordPress` are
# dynamically generated, and should only be modified via WordPress filters.
# Any changes to the directives between these markers will be overwritten.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
When I pasted what you gave me into the .htaccess file, there was no effect at all. We've tried putting it at the top of .htaccess, inside of # BEGIN WordPress, and after # END WordPress.
Please note that we have changed the primary URL in WPML to not have the 'www'.
So WPML is now configured as follows:
A different domain per language
EN hidden link
FR hidden link
Of course the issue now is that with the "www" the URL does not work.
hidden link (works)
hidden link (does not work).
We need it to work with the both the 'www' and without the 'www' for both the home page and all inside pages.
Or for something to strip out the 'www' universally.
Thanks for your help but this didn't work either... However, we found a solution that did work! I am sharing it here in case it helps others:
#Rewrite rule for WPML to strip www from URL if exist
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ hidden link{REQUEST_URI} [R=301,QSA,NC,L]
This has the effect of stripping out the "www." from any URL, ensuring https:// and most importantly it works with inside pages too.
Glad that you manged to resolved the issue with a working solution. Thanks for sharing the same i will add this to the ticket summary so that others can benefit from it as well.
I hope we can mark the ticket as resolved?
Feel free to contact us if you need further assistance with our plugin.
Have a great day.
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.