.htaccess problem on multilingual website
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Feb 16, 2021 2:24 pm
.htaccess problem on multilingual website
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
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
Reason: Title amended to better describe the problem
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Feb 16, 2021 2:24 pm
Re: .htaccess problem
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
## No directory listings
<IfModule mod_autoindex.c>
IndexIgnore *
</IfModule>
Should I modify it. If so, what should I do?
-NYDE
- abernyte
- Joomla! Virtuoso
- Posts: 3940
- Joined: Fri May 15, 2009 2:01 pm
- Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड
Re: .htaccess problem
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 particularly is not working now that was before?
What we obtain too cheap, we esteem too lightly…Thomas Paine
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Feb 16, 2021 2:24 pm
Re: .htaccess problem
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
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
- abernyte
- Joomla! Virtuoso
- Posts: 3940
- Joined: Fri May 15, 2009 2:01 pm
- Location: Écosse - Scozia - Escocia - Škotija -स्कॉटलैंड
Re: .htaccess problem
What error message is displayed when you try to access other pages?and gives an error message whenever I try to open any other page.
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
- Per Yngve Berg
- Joomla! Master
- Posts: 27539
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: .htaccess problem on multilingual website
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.
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.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Feb 16, 2021 2:24 pm
Re: .htaccess problem on multilingual website
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.
-
- Joomla! Apprentice
- Posts: 5
- Joined: Tue Feb 16, 2021 2:24 pm
Re: .htaccess problem on multilingual website
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.
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.
- Per Yngve Berg
- Joomla! Master
- Posts: 27539
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: .htaccess problem on multilingual website
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/
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/
- infograf768
- Joomla! Master
- Posts: 19069
- Joined: Fri Aug 12, 2005 3:47 pm
- Location: **Translation Matters**
Re: .htaccess problem on multilingual website
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.
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
---------------------------------
ex-Joomla Translation Coordination Team • ex-Joomla! Production Working Group
- Per Yngve Berg
- Joomla! Master
- Posts: 27539
- Joined: Mon Oct 27, 2008 9:27 pm
- Location: Romerike, Norway
Re: .htaccess problem on multilingual website
Yes, working now. Finish is no longer linked under 'en'
- toivo
- Joomla! Master
- Posts: 13261
- Joined: Thu Feb 15, 2007 5:48 am
- Location: Zagreb, Croatia
Re: .htaccess problem on multilingual website
Also confirming that pages in both languages are loaded all right. But a couple of questions remain.
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.
The original file framework.php in Joomla 3.9.24 does not refer to the constant HTTP_X_FORWARDED_FOR at all.
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