.htaccess problem on multilingual website

General questions regarding the use of languages in Joomla! 3.x.

Moderators: infograf768, General Support Moderators

Forum rules
Forum Rules
Absolute Beginner's Guide to Joomla! <-- please read before posting, this means YOU.
Forum Post Assistant - If you are serious about wanting help, you will use this tool to help you post.
Windows Defender SmartScreen Issues <-- please read this if using Windows 10.
Post Reply
NYDE6
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Feb 16, 2021 2:24 pm

.htaccess problem on multilingual website

Post by NYDE6 » Tue Feb 16, 2021 2:33 pm

I just updated my site's Joomla! version to 3.9.24. Now the site doesn't function properly. After the update I found this message:

Before 3.9.22 the default htaccess.txt file contained erroneous code meant for disabling directory listings. The security team recommends to manually apply the necessary changes to any existing .htaccess file, as this file can not be updated automatically.

The old code:

<IfModule autoindex>
IndexIgnore *
</IfModule>

The new code:

<IfModule mod_autoindex.c>
IndexIgnore *
</IfModule>

How do I change the code?

Grateful for help,
NYDE
Last edited by pe7er on Thu Feb 18, 2021 9:53 am, edited 1 time in total.
Reason: Title amended to better describe the problem

NYDE6
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Feb 16, 2021 2:24 pm

Re: .htaccess problem

Post by NYDE6 » Tue Feb 16, 2021 2:44 pm

I found this piece of code in the ,htaccess.txt file:


## No directory listings
<IfModule mod_autoindex.c>
IndexIgnore *
</IfModule>

Should I modify it. If so, what should I do?

-NYDE

User avatar
abernyte
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3971
Joined: Fri May 15, 2009 2:01 pm
Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड

Re: .htaccess problem

Post by abernyte » Tue Feb 16, 2021 4:02 pm

IndexIgnore* is part of the default .htaccess so it is unlikely to be the cause of your errors. You could comment out the line (place # in front of IndexIgnore*) and see if your site functions properly.

What particularly is not working now that was before?
What we obtain too cheap, we esteem too lightly…Thomas Paine

NYDE6
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Feb 16, 2021 2:24 pm

Re: .htaccess problem

Post by NYDE6 » Thu Feb 18, 2021 12:34 am

The site nydeguitars.com is both in Finnish and English. The English part seems to work, but The Finnish side shows only the front page properly and gives an eror message whenever I try to open anyother page.
There have been some security backups, and these are the messages and the instructions:

Additional XSS protection for the usage of SVG files

Since 3.9.21 Joomla is shipped with an additional security rule in the default htaccess.txt. This rule will protect users of svg files from potential Cross-Site-Scripting (XSS) vulnerabilities.
The security team recommends to manually apply the necessary changes to any existing .htaccess file, as this file can not be updated automatically.

Changes for .htaccess

<FilesMatch "\.svg$">
<IfModule mod_headers.c>
Header always set Content-Security-Policy "script-src 'none'"
</IfModule>
</FilesMatch>

.htaccess file changes
Add the following rows before "## Mod_rewrite in use.":

<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>

web.config file changes
add the following rows right away after the text"</rewrite>"

<httpProtocol>
<customHeaders>
<add name="X-Content-Type-Options" value="nosniff" />
</customHeaders>
</httpProtocol>

-NYDE

User avatar
abernyte
Joomla! Virtuoso
Joomla! Virtuoso
Posts: 3971
Joined: Fri May 15, 2009 2:01 pm
Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड

Re: .htaccess problem

Post by abernyte » Thu Feb 18, 2021 8:41 am

and gives an error message whenever I try to open any other page.
What error message is displayed when you try to access other pages?

Update. I found your site. It is displaying properly using the default language - English - but gives a 404 whenever you try to access the second language pages. Have you set up the multi language part correctly, has it ever worked?
This has nothing to do with your .htaccess if you are using the Joomla default and multi language sites are waaay outside my comfort zone. I hope someone with greater knowledge on this can help you.
What we obtain too cheap, we esteem too lightly…Thomas Paine

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27674
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: .htaccess problem on multilingual website

Post by Per Yngve Berg » Thu Feb 18, 2021 10:35 am

Mod. Note: Relocated the topic to the Language Forum.

Your language setup is wrong. /en work fine, but en/fi-fi should be /fi.

Check the Status in the Multi-language Status Administrator Module.

NYDE6
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Feb 16, 2021 2:24 pm

Re: .htaccess problem on multilingual website

Post by NYDE6 » Thu Feb 18, 2021 3:41 pm

Thank you for your answers, gentlemen. The problem lay evedently in the incompatibility of the Finnish language pack and the Joomla version 3.9.24. I restored the site from a file backup created on Feb 16th and the site works properly now.

NYDE6
Joomla! Apprentice
Joomla! Apprentice
Posts: 5
Joined: Tue Feb 16, 2021 2:24 pm

Re: .htaccess problem on multilingual website

Post by NYDE6 » Thu Feb 18, 2021 9:39 pm

I'm taking that back. The site is not working at all now. For a reason unknown to me it just stopped working on Thursday afternoon and is now showing an error message like this:


Notice: Undefined index: HTTP_X_FORWARDED_FOR in /home/u167052454/public_html/includes/framework.php on line 11

Warning: require_once(/home/u167052454/public_html/libraries/legacy/form/field/form.php) [function.require-once]: failed to open stream: No such file or directory in /home/u167052454/public_html/libraries/import.legacy.php on line 42

Fatal error: require_once() [function.require]: Failed opening required '/home/u167052454/public_html/libraries/legacy/form/field/form.php' (include_path='.:/opt/alt/php53/usr/share/pear:/opt/alt/php53/usr/share/php') in /home/u167052454/public_html/libraries/import.legacy.php on line 42


I cannot write code or fix code, so I don't know what to do about it. Until the beginning of February this year the site has worked without problems since summer 2014. I'd like to get it up again, so I don't have to rebuild the whole thing from scratch.

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27674
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: .htaccess problem on multilingual website

Post by Per Yngve Berg » Fri Feb 19, 2021 7:49 am

What version of php are your server running?

You have include to php 5.3 which is EOL for more than 5 years.
https://www.php.net/supported-versions.php

Please use the FPA so we can audit your server.
https://forumpostassistant.github.io/docs/

User avatar
infograf768
Joomla! Master
Joomla! Master
Posts: 19077
Joined: Fri Aug 12, 2005 3:47 pm
Location: **Translation Matters**

Re: .htaccess problem on multilingual website

Post by infograf768 » Fri Feb 19, 2021 7:59 am

Site loads OK here in Finnish as well as English.
The fact that fi-FI is used as URL language code has no impact on results.
IMHO, nothing to do with multilingual settings or Finnish language.
Jean-Marie Simonet / infograf · http://www.info-graf.fr
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group

User avatar
Per Yngve Berg
Joomla! Master
Joomla! Master
Posts: 27674
Joined: Mon Oct 27, 2008 9:27 pm
Location: Romerike, Norway

Re: .htaccess problem on multilingual website

Post by Per Yngve Berg » Fri Feb 19, 2021 9:00 am

Yes, working now. Finish is no longer linked under 'en'

User avatar
toivo
Joomla! Master
Joomla! Master
Posts: 13415
Joined: Thu Feb 15, 2007 5:48 am
Location: Sydney, Australia

Re: .htaccess problem on multilingual website

Post by toivo » Fri Feb 19, 2021 9:09 am

Also confirming that pages in both languages are loaded all right. But a couple of questions remain.

NYDE6 wrote:
Thu Feb 18, 2021 9:39 pm
Notice: Undefined index: HTTP_X_FORWARDED_FOR in /home/u167052454/public_html/includes/framework.php on line 11
The original file framework.php in Joomla 3.9.24 does not refer to the constant HTTP_X_FORWARDED_FOR at all.

NYDE6 wrote:
Thu Feb 18, 2021 9:39 pm
Warning: require_once(/home/u167052454/public_html/libraries/legacy/form/field/form.php) [function.require-once]: failed to open stream: No such file or directory in /home/u167052454/public_html/libraries/import.legacy.php on line 42
The line number and the file form.php in this warning are not consistent with Joomla 3.9.24 either.

Which version of Joomla was the site using before the update to 3.9.24? Did the update finish all right?

When you restored the previous version, did you restore the backup into an empty folder? Overwriting an existing filesystem with an older version can lead to unpredictable results, depending on how old the earlier version is. Most webmasters use a backup extension like Akeeba Backup and then restore the .jpa file using Akeeba's Kickstart utility.

The results from the Forum Post Assistant (FPA) would be really useful so that configuration can be reviewed.
Toivo Talikka, Global Moderator


Post Reply

Return to “Language - Joomla! 3.x”