Joomla.it Forum
Joomla! 1.5.x (versione con supporto terminato) => Joomla! 1.5 => : vassiskansa 15 Oct 2013, 14:57:34
-
Salve,
per esigenze personali avrei bisogno di escludere una cartella dal mod_rewrite dell'htaccess quando abilito l'url_rewrite dal pannello di controllo del sito Joomla.
Ho provato molte ricette trovate su internet ma nessuna di queste sembra funzionare.
Quella che mi sembra più giusta è la seguente:
...
#RewriteBase /
RewriteCond %{REQUEST_URI} !^/(miacartella.*)$
########## Begin - Joomla! core SEF Section
#
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
...
Ma ovviamente non funziona, e ho disperatamente bisogno di permettere l'accesso a quella cartella.
Grazie.
-
l'accesso alla cartella cosa ha a che vedere con la riscrittura delle url? ??? ???
-
l'accesso alla cartella cosa ha a che vedere con la riscrittura delle url? ??? ???
Non lo so, sta di fatto che se abilito l'htaccess non mi fa fare più accesso alla mia cartella...
-
Non lo so, sta di fatto che se abilito l'htaccess non mi fa fare più accesso alla mia cartella...
Adesso ho capito, lo scrivi del htaccess come se fosse prematurata a 64 bit mentre invece è solo antani ;)
-
Adesso ho capito, lo scrivi del htaccess come se fosse prematurata a 64 bit mentre invece è solo antani ;)
dai che hai capito quello che voglio fare...
-
Nessuno può aiutarmi?
-
Forse se fai un esempio si capisce meglio.
-
Forse se fai un esempio si capisce meglio.
Forse hai ragione. Metto qui di seguito il file .htaccess di Joomla 1.5
##
# @version $Id: htaccess.txt 21064 2011-04-03 22:12:19Z dextercowley $
# @package Joomla
# @copyright Copyright (C) 2005 - 2010 Open Source Matters. All rights reserved.
# @license http://www.gnu.org/copyleft/gpl.html GNU/GPL
# Joomla! is Free Software
##
#####################################################
# READ THIS COMPLETELY IF YOU CHOOSE TO USE THIS FILE
#
# The line just below this section: 'Options +FollowSymLinks' may cause problems
# with some server configurations. It is required for use of mod_rewrite, but may already
# be set by your server administrator in a way that dissallows changing it in
# your .htaccess file. If using it causes your server to error out, comment it out (add # to
# beginning of line), reload your site in your browser and test your sef url's. If they work,
# it has been set by your server administrator and you do not need it set here.
#
#####################################################
## Can be commented out if causes errors, see notes above.
Options +FollowSymLinks
#
# mod_rewrite in use
RewriteEngine On
########## Begin - Rewrite rules to block out some common exploits
## If you experience problems on your site block out the operations listed below
## This attempts to block the most common type of exploit `attempts` to Joomla!
#
## Deny access to extension xml files (uncomment out to activate)
#<Files ~ "\.xml$">
#Order allow,deny
#Deny from all
#Satisfy all
#</Files>
## End of deny access to extension xml files
# Block out any script trying to set a mosConfig value through the URL
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|\%3D) [OR]
# Block out any script trying to base64_encode data within the URL
RewriteCond %{QUERY_STRING} base64_encode[^(]*\([^)]*\) [OR]
# Block out any script that includes a <script> tag in URL
RewriteCond %{QUERY_STRING} (<|%3C)([^s]*s)+cript.*(>|%3E) [NC,OR]
# Block out any script trying to set a PHP GLOBALS variable via URL
RewriteCond %{QUERY_STRING} GLOBALS(=|\[|\%[0-9A-Z]{0,2}) [OR]
# Block out 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 homepage
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 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 request is for root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} (/[^.]*|\.(php|html?|feed|pdf|raw))$ [NC]
# 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
Ecco, quindi sulla root del sito c'è questo htaccess. Se io dovessi accedere liberamente alla MIACARTELLA del sito, che è sotto la root directory, cosa dovrei aggiungere a questo htaccess e soprattutto a che punto?
Grazie.
-
Forse ancora non mi sono espresso a dovere, io ho questa situazione:
/root
-> ecc
-> ecc
-> .htaccess
-> MIACARTELLA
--> ecc
-->ecc
La domanda è: come faccio a dire all'htaccess di ignorare le rewrite conditions per la MIACARTELLA?
-
Se digiti miosito.xx/ MIACARTELLA?
-
Buongiorno,
a parte l'estrema criptcità della richiesta, non sarebbe meglio postare qui un libk al sito per capire cosa succede e quindi intervenire meglio? ;)
-
Se digiti miosito.xx/ MIACARTELLA?
Precisamente.
Buongiorno,
a parte l'estrema criptcità della richiesta, non sarebbe meglio postare qui un libk al sito per capire cosa succede e quindi intervenire meglio?
Purtroppo per rispettare la privacy del mio cliente non posso postare link esatti.
Mi dispiace ma credevo di essere stato chiaro abbastanza. Se voglio accedere a www.miosito.it/MIACARTELLA ho un .htaccess al livello della root directory che "blocca" l'accesso alla MIACARTELLA con un errore 404.
Scusatemi ancora...
Grazie.
-
Nella cartella quale file segue, cioè se hai un url che punta ad una cartella si aprirà di default un file index.html ed a seguire se manca il primo, index.php, questi file ci sono nella cartella?
-
c'é un index.php!
-
E si dovrebbe aprire, non credo che c'entri il .htaccess magari l'errore è un altro, ma senza link non posso capire meglio. Dai miei siti accedo senza problemi a cartelle nella root con o senza .htaccess standard di joomla.
-
Strano concetto di privacy, visto che un sito internet per sua stessa definizione è pubblico! ;D
Cmq, concordo con tomtom, chissà che c'é dentro quell'index.php ;) io stesso, ma anche altri, e senza difficoltà usiamo per varie necessità o normali pagine html o php in apposite cartelle quindi al di fuori di Joomla! :)
Ciao!
-
Se non vuoi avere ingressi nel tuo sito provenienti dal sito joomla, metti il link spaziato così risulteranno ingressi diretti e non provenienti dal forum. Comunque concordo che al di là della privacy un link può far male a propria insaputa.
-
Strano concetto di privacy, visto che un sito internet per sua stessa definizione è pubblico! ;D
Cmq, concordo con tomtom, chissà che c'é dentro quell'index.php ;) io stesso, ma anche altri, e senza difficoltà usiamo per varie necessità o normali pagine html o php in apposite cartelle quindi al di fuori di Joomla! :)
Ciao!
Hai ragione, pago dazio! In quella cartella c'è a sua volta un htaccess:
AuthUserFile .htpasswd
AuthGroupFile /dev/null
AuthName "Password Protected Area"
AuthType Basic
<limit GET POST>
require valid-user
</limit>
Per accedere a quella cartella c'è bisogno di utente e password. Se disattivo questo htaccess l'accesso alla cartella viene effettuato correttamente, ma non posso lasciarla così per ovvie ragioni... Qualche suggerimento? Anche se ormai è affermato che non si tratta più di problemi con Joomla...
-
Ho scavato ancora più a fondo. Sull'error.log di apache2 vedo ciò che segue:
[Tue Oct 22 15:48:49 2013] [warn] [client X.X.X.X] mod_fcgid: stderr: PHP Strict Standards: Non-static method JFactory::getConfig() should not be called statically, assuming $this from incompatible context in .../web/plugins/system/jfdatabase/jfdatabase_inherit.php on line 557
Secondo me c'è ancora lo zampino di qualche plugin di Joomla che mi blocca...
-
Non c'entra nulla Joomla, quegli errori li da anche durante il normale funzionamento.
Evitate di leggere l'ultimo post...
-
Risolto. Seguite questo post: http://www.andrewrollins.com/2008/01/22/wordpress-and-htaccess-password-protected-directories/ anche se è per wordpress la cosa è applicabile per ogni CMS usiate.
-
Quindi in fine volevi proteggere una cartella con una password?
-
Quindi in fine volevi proteggere una cartella con una password?
oh yes, l'avevo scritto quando ho postato l'htaccess della MIACARTELLA...