Joomla.it Forum
Componenti per Joomla! => SEO => : shark996 24 Feb 2009, 00:36:29
-
'giorno,
è da un paio d'ore che cerco di togliere index.php? all'inizio del link con SH404SEF, ma non ci riesco.
Mi sono già letto come funziona il file .htaccess ma non ne vengo fuori
Info sistema:
Xampp installato in locale
Joomla 1.5.9 Ita
ho seguito vari Topic, ho creato il file .htaccess ma niente mi esce errore 404 o 500
Ho provato a seguire questi passaggi:
Per chi fosse interessato ad eliminare la scritta index.php segua questi passaggi:
Componenti -> sh404sef -> configurazione.
Scegliete la linguetta con la scritta: "avanzato"
e mettete l'opzione modalità rescrivibile: [con .htaccess (mod_rewrite)]
Fatto questo tramite ftp copiatevi il file nascosto .htaccess che si trova all'interno della cartella principale sul vostro pc.
Fatevene una copia di salvataggio e poi modificate il contenuto in questo modo.
Noterete che all'interno del file ci sono due sezioni
Joomla! core SEF Section e 3rd Party SEF Section
più o meno così strutturate:
-------------
########## Begin - Joomla! core SEF Section
#
########## End - Joomla! core SEF Section
-------------
########## Begin - 3rd Party SEF Section
#
########## End - 3rd Party SEF Section
Bene nella sezione Joomla! dovete "remmare" tutte le stringhe contenute. In pratica porre il simbolo # (cancelletto) avanti ad ogni riga.
Viceversa nella sezione 3rd party dovete togliere il carattere # anteposto alle varie opzioni. Esempio:
Prima della modifica:
---------------------
########## Begin - Joomla! core SEF Section
############# Use this section if using ONLY Joomla! core SEF
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteRule ^(content/|component/) index.php
#
########## End - Joomla! core SEF Section
########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section
Dopo la modifica:
-----------------
########## Begin - Joomla! core SEF Section
############# Use this section if using ONLY Joomla! core SEF
## ALL (RewriteCond) lines in this section are only required if you actually
## have directories named 'content' or 'component' on your server
## If you do not have directories with these names, comment them out.
#
#RewriteCond %{REQUEST_FILENAME} !-f
#RewriteCond %{REQUEST_FILENAME} !-d
#RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
#RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
#RewriteRule ^(content/|component/) index.php
#
########## End - Joomla! core SEF Section
########## Begin - 3rd Party SEF Section
############# Use this section if you are using a 3rd party (Non Joomla! core) SEF extension - e.g. OpenSEF, 404_SEF, 404SEFx, SEF Advance, etc
#
RewriteCond %{REQUEST_URI} ^(/component/option,com) [NC,OR] ##optional - see notes##
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|/[^.]*)$ [NC]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule (.*) index.php
#
########## End - 3rd Party SEF Section
ATTENZIONE! Questa procedura funziona solo se avete joomla installato nella directory principale del vostro spazio web. Se avete il vostro sito in una sottocartella, dovete modificare (se non sbaglio) un opzione all'interno del file .htaccess
Idee?
So già che siete stufi di vedere scritti sempre i soliti problemi ma confido nella vostra bontà ;D
Thanks
-
:-\
-
da dove lo hai preso questo htaccess?
Questo è per joomla 1.0 (se leggi bene, anche nel sito di sh404, da dove suppongo tu lo abbia preso, c'è scritto)
Per joomla 1.5, l'htaccess in dotazione va perfettamente bene. Non ha la sezione "3rd Party SEF Section".
-
Ciao e grazie per la risposta,
l'ho preso da un topic trovato qui sul forum! Evidentemente non ho letto bene ed è come dici tu per la 1.0.
Quindi provo con l'Htaccess già integrato?
Nella modalità rescrivibile dish404 ho:
con htaccess (mod rewrite)
senza htaccess (index.php)
con htaccess (index.php?)
imposto la prima e dovrebbe funzionare?
-
imposti la prima solo dopo aver attivato il mod_rewrite rinominato l'htaccess :)
-
Speravo la prendesse meglio, le prove le sto facendo direttamente sul server di produzione, sono su top host.
Internal Server Error
The server encountered an internal error or misconfiguration and was unable to complete your request.
Please contact the server administrator, [no address given] and inform them of the time the error occurred, and anything you might have done that may have caused the error.
More information about this error may be available in the server error log.
Additionally, a 500 Internal Server Error error was encountered while trying to use an ErrorDocument to handle the request.
-
errore di htaccess, quindi.
I casi sono:
dichiarazioni non consentite
htaccess non consentito.
Come prima cosa prova commentando/decommentando le righe Option+FollowLinks e Rewrite_base
-
Ciao,
ho notato tramite ftp che mi hanno cancellato il file .htaccess è possibile? Ho il backup e lo posso anche ripristinare però mi sembra strano ???
-
modificato il messaggio precedente
-
bada che l'htaccess è un file nascosto.
Per vederlo con l'ftp, devi accertarti che sia impostato per visualizzare i file nascosti :)
-
ok fatto ;D ora lo vedo.
Provo nel week a commentare le righe che mi hai detto. Vediamo un pò se funziona :)