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

Last updated by Bobby 6 months, 1 week ago.

Assigned support staff: Bobby.

Author Posts
April 13, 2020 at 11:43 pm #5899293

enisF

Hello,

For the website we have created two language sites, as always we start with the wordpress in english language we have uploaded themes and plugins a customized and configured the whole website and at the end we activated WPML and translated the web in to Albanian lang and made the Main language and Hided the English language sites. After a time in this part we came across on some issues as for example if we made changes in the theme it had no effect until we figured out that we need to reactive the English language from wpml who was Hidden and made that change there in that Page, after this process then we saw the effect in the Albanian Lang even if the Albanian Lang it the main language! .

But this is not the issue that has force us to contact you about the issue, there is another bigger issue than that.

After a time we saw that the website does not load the other pages but only the Home page, so no property pages, no contact pages, nothing else! the Error was : Internal Server Error.

After this we contacted our Server support team, and they found the issue, they said us that the issue is that we have added in the .htaccess file in the IfModule mod_rewrite.c that the site should load from a subfolder rule and not directly from the index.php.

They said as it was the subfolder ( SQ )

As we knew that we have never touched there anything and that SQ is the prefix of our Main language Albanian we suspect that it is the WPML plugin.

After they fixed it time after time it happens again without touching anything from our side nowhere not even a plugin update or a little change somewhere in the dashboard.

We need your help to fix this issue.
Thank you

We will past you here the comment from the server support team.

What we do fix the issue is check the following rule in the htaccess file of your website:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

When the issue is present the rule looks like this:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /sq/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /sq/index.php [L]
</IfModule>

Notice the "/sq" this is what is causing the redirection issue. We remove it and that fixes it. This can be caused by a plugin due to which we would recommend that you try disabling the plugins which you have one by one and checking if it reoccurs.

Regards

April 14, 2020 at 1:40 am #5899473

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

Hi There,

Please review the following documentation

https://wpml.org/errata/htaccess-is-rewritten-with-language-folder/

Let me know your results, please.

April 14, 2020 at 2:00 am #5899497

enisF

Hello,

Thanks for your replay,

Alright i will try, hope this will fix it.
Can you please tell me should i add this code to the Parent Theme in function.php file or Child Theme ?

Thank you

April 14, 2020 at 3:24 am #5900189

Bobby
Supporter

Languages: English (English )

Timezone: America/Los_Angeles (GMT-07:00)

I recommend the Child Theme as it won't be removed with your next theme update.

The topic ‘[Closed] .htaccess issue’ is closed to new replies.