Back to top

Autore Topic: errore 500  (Letto 2165 volte)

Offline enzoman

  • Esploratore
  • **
  • Post: 159
    • Mostra profilo
errore 500
« il: 16 Mag 2023, 10:49:16 »

Buongiorno a tutti, ho caricato il backup di un sito su un server.
Dalla copia di backup caricata ho tolto il file .htaccess e una volta caricato il sito sul server ho rinominato il file htaccess.txt in .htaccess
Quando mi collego al backend appare l’errore:


Errore 500 :(
Si è verificato un errore.
Se il problema persiste, probabilmente il programma che hai tentato di eseguire non funziona correttamente, o perché qualcuno ci sta lavorando, o perché si tratta di un malfunzionamento dovuto a qualche bug di programmazione, in questo caso informaci.


Come posso risolvere?

Offline giusebos

  • Fuori controllo
  • *
  • Post: 21748
  • Sesso: Maschio
  • Giuseppe Serbelloni Mazzanti Viendalmare
    • Mostra profilo
Re:errore 500
« Risposta #1 il: 16 Mag 2023, 14:35:13 »
editando il file hataccess per adattarlo al tuo server
su www.icagenda.it guide e tutorial con esempi di chronoforms e chronoconnectivity

Offline enzoman

  • Esploratore
  • **
  • Post: 159
    • Mostra profilo
Re:errore 500
« Risposta #2 il: 16 Mag 2023, 15:44:01 »
ok grazie, puoi consigliarmi un tutorial per farlo?

Offline giusebos

  • Fuori controllo
  • *
  • Post: 21748
  • Sesso: Maschio
  • Giuseppe Serbelloni Mazzanti Viendalmare
    • Mostra profilo
Re:errore 500
« Risposta #3 il: 17 Mag 2023, 01:44:06 »
Questa volata ho fatto io la ricerca su google per te...
http://www.blogjoomla.it/2009112556/configurazione-del-file-htaccess-per-joomla.html


appena modificato torna ad aggiornarci  su come è andata.
su www.icagenda.it guide e tutorial con esempi di chronoforms e chronoconnectivity

Offline enzoman

  • Esploratore
  • **
  • Post: 159
    • Mostra profilo
Re:errore 500
« Risposta #4 il: 17 Mag 2023, 12:20:53 »
Grazie infinite per il tuo aiuto. Nei giorni scorsi avevo provato la stessa procedura letta su un’altra guida, ma senza esito.[/font][/color]
Ho riprovato di nuovo, ma appare anche stavolta l’errore 500.[/font][/color]

Puntualizzo qualche parte su cui potrebbe esserci qualche dubbio:[/font][/color]
1) al rigo Rewritebase / ho cancellato non soltanto il # ma anche gli spazi precedenti in modo che la parola Rewritebase cominci all’inizio della riga e non dopo qualche spazio;[/font][/color]
2) attualmente il file htaccess.txt non c’è più sul server perchè dopo che l’ho rinominato ha sostituito .htaccess. Quindi ora ho soltanto il file .htaccess e non più htaccess.txt[/font][/color]
3) Nel tutorial che mi hai linkato era scritto di fare l’upload del file .htaccess modificato. Invece io seguendo il seguente ordine ho: 1) modificato il file htaccess.txt secondo quanto indicato nella guida; 2) fatto l’upload; 3) rinominato il file una volta che era già all’interno del server online.[/font][/color]

Il server su cui ho fatto l’upload è di Altervista e da una breve ricerca su web sembra che il mod rewrite lo abbiano sempre attivo sebbene anche altri utenti abbiano avuto problemi con il file htaccess[/font][/color]

Offline giusebos

  • Fuori controllo
  • *
  • Post: 21748
  • Sesso: Maschio
  • Giuseppe Serbelloni Mazzanti Viendalmare
    • Mostra profilo
Re:errore 500
« Risposta #5 il: 17 Mag 2023, 16:32:36 »
quando si parla di htaccess si parla di un file attivo e funzionante, ovvero nel formato
.htaccess

quando il suddetto file è nominato in htaccess.txt non si parla di NIENTE, in quanto questo file così nominato è invisibile, inesistente, inutile, non serve a nulla, è disabilitato.

su www.icagenda.it guide e tutorial con esempi di chronoforms e chronoconnectivity

Offline giusebos

  • Fuori controllo
  • *
  • Post: 21748
  • Sesso: Maschio
  • Giuseppe Serbelloni Mazzanti Viendalmare
    • Mostra profilo
Re:errore 500
« Risposta #6 il: 17 Mag 2023, 16:33:51 »
Cortesemente inserisci risolto come si conviene ad una discussione risolta, se non sai come chiedi e/o guarda le discussioni risolte come vengono segnalate "risolte"
su www.icagenda.it guide e tutorial con esempi di chronoforms e chronoconnectivity

Offline enzoman

  • Esploratore
  • **
  • Post: 159
    • Mostra profilo
Re:errore 500
« Risposta #7 il: 18 Mag 2023, 08:19:29 »
Purtroppo ancora non ho risolto. In questo momento non so come procedere...[/font][/color]

Offline enzoman

  • Esploratore
  • **
  • Post: 159
    • Mostra profilo
Re:errore 500
« Risposta #8 il: 19 Mag 2023, 20:47:09 »
Scusami se ti disturbo ancora. Potresti consigliarmi una possibile soluzione?

Offline giusebos

  • Fuori controllo
  • *
  • Post: 21748
  • Sesso: Maschio
  • Giuseppe Serbelloni Mazzanti Viendalmare
    • Mostra profilo
Re:errore 500
« Risposta #9 il: 20 Mag 2023, 01:39:59 »
copia qui il codice del file .htacces.

per cortesia usa il tag code, icona con il cancelletto
su www.icagenda.it guide e tutorial con esempi di chronoforms e chronoconnectivity

Offline enzoman

  • Esploratore
  • **
  • Post: 159
    • Mostra profilo
Re:errore 500
« Risposta #10 il: 20 Mag 2023, 11:30:15 »

Codice: [Seleziona]
##
# @package    Joomla
# @copyright  (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##


##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of Apache mod_rewrite, but it may have already been set by
# your server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##


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


## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>


## Can be commented out if causes errors, see notes above.
# Options +FollowSymlinks
Options -Indexes


## Disable inline JavaScript when directly opening SVG files or embedding them with the object-tag
<FilesMatch "\.svg$">
  <IfModule mod_headers.c>
    Header always set Content-Security-Policy "script-src 'none'"
  </IfModule>
</FilesMatch>


## Mod_rewrite in use.


RewriteEngine On


## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.


## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects


##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##


RewriteBase /


## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.


# # av:php5-engine
AddHandler av-php82 .php

Offline giusebos

  • Fuori controllo
  • *
  • Post: 21748
  • Sesso: Maschio
  • Giuseppe Serbelloni Mazzanti Viendalmare
    • Mostra profilo
Re:errore 500
« Risposta #11 il: 20 Mag 2023, 20:38:14 »
cancella il file e reintegralo estrapolandolo da un pacchetto vergine,
configura il seo in backend e poi attiva l'htaccess

se ancora non funziona le seguenti stringhe non devono essere commentate

Codice: [Seleziona]
Options +FollowSymlinks
Options -Indexes

quindi Nessun cancelletto prima

mentre la stringa
Codice: [Seleziona]
# RewriteBase /
dovra essere commentata.

Trovati una guida su come attivare il seo su joomla su google e leggila attentamente, vedrai che trovi dove hai sbagliato  e risolverai.


su www.icagenda.it guide e tutorial con esempi di chronoforms e chronoconnectivity

Offline $Red

  • Moderator
  • Instancabile
  • *****
  • Post: 5351
  • "Bastard Inside"
    • Mostra profilo
Re:errore 500
« Risposta #12 il: 21 Mag 2023, 15:50:26 »
Ciao, per altervista leggi qui https://alterjoomla.altervista.org/guide-joomla-altervista/2-configurare-il-seo-di-joomla-e-php-altervista.html c'è scritto per joomla 3 ma non cambia nulla!

Offline enzoman

  • Esploratore
  • **
  • Post: 159
    • Mostra profilo
Re:errore 500
« Risposta #13 il: 10 Giu 2023, 13:20:33 »
ciao grazie per i suggerimenti e per il link. Ho provato con cinque diversi tentativi di file .htaccess ma nessuno di questi ha funzionato. Non avendo la possibilità di accedere al backend (a causa dell’errore 500) non ho potuto configurare il seo come descritto dalla guida..
htaccess1:
Codice: [Seleziona]
##
# @package    Joomla
# @copyright  (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##


##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of Apache mod_rewrite, but it may have already been set by
# your server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##


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


## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>


## Can be commented out if causes errors, see notes above.
#Options +FollowSymlinks
Options -Indexes


## Disable inline JavaScript when directly opening SVG files or embedding them with the object-tag
<FilesMatch "\.svg$">
  <IfModule mod_headers.c>
    Header always set Content-Security-Policy "script-src 'none'"
  </IfModule>
</FilesMatch>


## Mod_rewrite in use.


RewriteEngine On


## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.


## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects


##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##


 RewriteBase /


## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.[code]


htaccess2
[code]##
# @package    Joomla
# @copyright  (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##


##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of Apache mod_rewrite, but it may have already been set by
# your server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##


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


## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>


## Can be commented out if causes errors, see notes above.
#Options +FollowSymlinks
Options -Indexes


## Disable inline JavaScript when directly opening SVG files or embedding them with the object-tag
<FilesMatch "\.svg$">
  <IfModule mod_headers.c>
    Header always set Content-Security-Policy "script-src 'none'"
  </IfModule>
</FilesMatch>


## Mod_rewrite in use.


RewriteEngine On


## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.


## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects


##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##


 RewriteBase /


## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
# # ay:php5-engine
AddHandler av-php8 .php[code]




htaccess 3
[code]##
# @package    Joomla
# @copyright  (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##


##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of Apache mod_rewrite, but it may have already been set by
# your server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##


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


## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>


## Can be commented out if causes errors, see notes above.
# Options +FollowSymlinks
Options -Indexes


## Disable inline JavaScript when directly opening SVG files or embedding them with the object-tag
<FilesMatch "\.svg$">
  <IfModule mod_headers.c>
    Header always set Content-Security-Policy "script-src 'none'"
  </IfModule>
</FilesMatch>


## Mod_rewrite in use.


RewriteEngine On


## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.


## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects


##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##


RewriteBase /


## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.[code]




htaccess 4
[code]##
# @package    Joomla
# @copyright  (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##


##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of Apache mod_rewrite, but it may have already been set by
# your server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##


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


## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>


## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes


## Disable inline JavaScript when directly opening SVG files or embedding them with the object-tag
<FilesMatch "\.svg$">
  <IfModule mod_headers.c>
    Header always set Content-Security-Policy "script-src 'none'"
  </IfModule>
</FilesMatch>


## Mod_rewrite in use.


RewriteEngine On


## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.


## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects


##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##


# RewriteBase /


## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.[code]




htaccess 5
[code]##
# @package    Joomla
# @copyright  (C) 2005 Open Source Matters, Inc. <https://www.joomla.org>
# @license    GNU General Public License version 2 or later; see LICENSE.txt
##


##
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE!
#
# The line 'Options +FollowSymLinks' may cause problems with some server configurations.
# It is required for the use of Apache mod_rewrite, but it may have already been set by
# your server administrator in a way that disallows changing it in this .htaccess file.
# If using it causes your site to produce an error, comment it out (add # to the
# beginning of the line), reload your site in your browser and test your sef urls. If
# they work, then it has been set by your server administrator and you do not need to
# set it here.
##


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


## Suppress mime type detection in browsers for unknown types
<IfModule mod_headers.c>
Header always set X-Content-Type-Options "nosniff"
</IfModule>


## Can be commented out if causes errors, see notes above.
Options +FollowSymlinks
Options -Indexes


## Disable inline JavaScript when directly opening SVG files or embedding them with the object-tag
<FilesMatch "\.svg$">
  <IfModule mod_headers.c>
    Header always set Content-Security-Policy "script-src 'none'"
  </IfModule>
</FilesMatch>


## Mod_rewrite in use.


RewriteEngine On


## Begin - Rewrite rules to block out some common exploits.
# If you experience problems on your site then comment out the operations listed
# below by adding a # to the beginning of the line.
# This attempts to block the most common type of exploit `attempts` on Joomla!
#
# Block any script trying to base64_encode data within the URL.
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block any script that includes a <script> tag in URL.
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block any script trying to set a PHP GLOBALS variable via URL.
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block any script trying to modify a _REQUEST variable via URL.
RewriteCond %{QUERY_STRING} _REQUEST(=|\[|\%[0-9A-Z]{0,2})
# Return 403 Forbidden header and show the content of the root home page
RewriteRule .* index.php [F]
#
## End - Rewrite rules to block out some common exploits.


## Begin - Custom redirects
#
# If you need to redirect some pages, or set a canonical non-www to
# www redirect (or vice versa), place that code here. Ensure those
# redirects use the correct RewriteRule syntax and the [R=301,L] flags.
#
## End - Custom redirects


##
# Uncomment the following line if your webserver's URL
# is not directly related to physical file paths.
# Update Your Joomla! Directory (just / for root).
##


# RewriteBase /


## Begin - Joomla! core SEF Section.
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
#
# If the requested path and file is not /index.php and the request
# has not already been internally rewritten to the index.php script
RewriteCond %{REQUEST_URI} !^/index\.php
# and the requested path and file doesn't directly match a physical file
RewriteCond %{REQUEST_FILENAME} !-f
# and the requested path and file doesn't directly match a physical folder
RewriteCond %{REQUEST_FILENAME} !-d
# internally rewrite the request to the index.php script
RewriteRule .* index.php [L]
#
## End - Joomla! core SEF Section.
# # av:php5-engine
AddHandler av-php8 .php[code]


La versione php avevo salvato alla versione 8 dall'interno del mio account altervista, già prima di fare ogni singolo tentativo con i cinque files .htaccess.




Offline enzoman

  • Esploratore
  • **
  • Post: 159
    • Mostra profilo
Re:errore 500
« Risposta #14 il: 11 Lug 2023, 19:55:09 »

Sintetizzando, le differenze tra una variante e l'altra sono:




file 1) Options +FollowSymlinks commentato senza spazio dopo # -- RewriteBase / non commentato e con uno spazio a inizio rigo -- alla fine del file senza # # ay:php5-engine
AddHandler av-php8 .php


file 2) Options +FollowSymlinks commentato senza spazio dopo # -- RewriteBase / non commentato e con uno spazio a inizio rigo -- alla fine del file con # # ay:php5-engine
AddHandler av-php8 .php


file 3) Options +FollowSymlinks commentato con spazio dopo # -- RewriteBase / non commentato e senza spazio a inizio rigo -- alla fine del file senza # # ay:php5-engine
AddHandler av-php8 .php


file 4) Options +FollowSymlinks non commentato -- RewriteBase / commentato e con spazio dopo # -- alla fine del file senza # # ay:php5-engine
AddHandler av-php8 .php


file 5) Options +FollowSymlinks non commentato -- RewriteBase / commentato e con spazio dopo # -- alla fine del file con # # ay:php5-engine
AddHandler av-php8 .php

 



Web Design Bolzano Kreatif