Skip Navigation

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 4 replies, has 2 voices.

Last updated by Carlos Rojas 4 years, 9 months ago.

Assisted by: Carlos Rojas.

Author Posts
February 13, 2020 at 10:58 am #5485307

rolfv

Dear support,

## Tell us what you are trying to do?
The non WWW site redirects to the default language.

Is there any documentation that you are following?
Yes, there are ton of examples with exact the same problem. I just couldn't get it to work.

Is there a similar example that we can see?

## What is the link to your site?

The default website is: cashdesk.nl.

hidden link > redirects to the default language
hidden link > correct translation

This is for all 3 different translations.

This is the current .htaccess:
```
# BEGIN WordPress
# De richtlijnen (regels) tussen `BEGIN WordPress` and `END WordPress` worden
# dynamisch aangemaakt en zouden enkel aangepast mogen worden via WordPress filters.
# Elke wijziging aan deze richtlijnen tussen deze markeringen worden overschreven.
<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

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ <u>cashdesk.nl</u>{HTTP_HOST}/$1 [R=301,L]
</IfModule>
```

Also, we get an "non validation" error when saving the languages.

Please, let us know if you need more information, or if anything is unclear.

Kind regards,
Roy van der Zon

Screenshot 2020-02-13 at 11.56.45.png
February 13, 2020 at 1:53 pm #5486727

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hello,
Thank you for contacting WPML support.

1.- Please increase the PHP Memory Limit. Minimum requirements are 128Mb: https://wpml.org/home/minimum-requirements/
You can add this to wp-config.php to increase WP memory:`

/** Memory Limit */
define('WP_MEMORY_LIMIT', '128M');
define( 'WP_MAX_MEMORY_LIMIT', '128M' );

- Add it above the line /* That's all, stop editing! Happy blogging. */

2.- There is a very strange behavior when I visit hidden link URL because I got redirected to hidden link

I would like to ask you to check with your hosting providers and/or your domain providers if the domains and the server are correctly setup according to the requirements for this configuration: https://wpml.org/tutorials/2016/04/use-wpml-different-domains-per-language/

Kind regards,
Carlos

February 20, 2020 at 10:03 am #5531457

rolfv

Hi Carlos,

Sorry for reopening this ticket, but I wanted to thank you for your effort and great support.
We got it trough work with the following snippet above the .htaccess:

---

RewriteEngine On
RewriteCond %{HTTP_HOST} !=""
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ hidden link{HTTP_HOST}%{REQUEST_URI} [R=301,L]

---

We had tried this before without result because of our aggressive caching setup. After disabling all the plugins and modules, we got results. Tip: use another browser or another machine to test.

Kind regards,
Roy

February 20, 2020 at 10:32 am #5531781

Carlos Rojas
Supporter

Languages: English (English ) Spanish (Español )

Timezone: Europe/Madrid (GMT+01:00)

Hi Roy,

I'm glad to hear that the issue is solved 🙂

Please don't hesitate to contact us if you need our help in the future with WPML. We will be more than happy to help.
Best regards,
Carlos