Back to top

Autore Topic: perchè il mio htaccess non funziona bene?  (Letto 2567 volte)

Offline marc

  • Esploratore
  • **
  • Post: 184
    • Mostra profilo
perchè il mio htaccess non funziona bene?
« il: 27 Feb 2012, 17:44:06 »
ciao ho modificato htaccess che era  gia nella root principale di joomla ma ora mi chiede l'accesso con password anche dal front end, questo è il codice che ho inserito forse ho sbagliato a dare il comando e la restrizione viene applicata a tutto il sito invece di agire solo sulla cartella administrator, questo è il codice che sto usando:
Codice: [Seleziona]

AuthType Basic
AuthName "Area protetta"
AuthUserFile /path assoluta/administrator/nomecartella/.htpasswd
require valid-user


Offline 56francesco

  • Fuori controllo
  • *
  • Post: 29585
  • Sesso: Maschio
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #1 il: 27 Feb 2012, 17:52:55 »
cosa vorresti ottenere?
(uso XP perchè win98 non si installa) 
PS: non sono un dipendente dello sbonzor quindi è necessario un "per favore" alla richiesta e un "grazie" alla risposta, sempre! PPS: non scrivo mai per primo in MP, in caso contrario chiedimi una conferma, Grazie.

Offline marc

  • Esploratore
  • **
  • Post: 184
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #2 il: 27 Feb 2012, 17:59:36 »
ciao 56francesco
 vorrei avere una richiesta password e nome utente prima di accedere alla pagina administrator e per qualsiasi altro accesso alla cartella administrator

Offline marc

  • Esploratore
  • **
  • Post: 184
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #3 il: 27 Feb 2012, 19:21:29 »
credo di aver risolto lasciando indenne dalle mie modifiche htacces della root principale ed inserendo una copia dello htaccess con la restrizione nella cartella administrator, al momento dalle prove fatte va bene ma farò altre prove per essere certo del risultato.
se secondo voi quello che ho fatto non va bene fatemelo sapere, grazie
ciao

Offline LucaD98

  • Esploratore
  • **
  • Post: 181
  • Sesso: Maschio
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #4 il: 27 Feb 2012, 19:41:35 »
Il file .htaccess agisce sulla cartella nel quale è messo e in tutte le sottocartelle che non possiedono un file .htaccess loro. Quindi per ottenere la protezione solo quando si accede all'amministrazione del sito bisogna mettere il file solamente nella cartella administrator. In questo caso il file .htaccess avrà effetto solo quando si tenta di accedere al back-end e non quando si visita il front-end.
Ciao.

Offline marc

  • Esploratore
  • **
  • Post: 184
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #5 il: 27 Feb 2012, 20:00:44 »
ho dovuto risolvere cosi perchè se tglievo htaccess dalla root pricipale il sito non funzionava (non sono in grado di capire perchè) se invece inserivo un htacces nella cartella administrator che riportava SOLO il codice che ho inserito nel primo post avevo un errore che mi riportava come causa proprio htaccess.
sono aperto ad ogni opinione/consiglio se ne hai o avete  sono qui!  :)

Offline LucaD98

  • Esploratore
  • **
  • Post: 181
  • Sesso: Maschio
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #6 il: 27 Feb 2012, 20:13:31 »
Il file nella cartella administrator oltre il codice inserito nel primo post che cosa contiene? I comandi per il rewrite di Joomla?

Offline marc

  • Esploratore
  • **
  • Post: 184
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #7 il: 27 Feb 2012, 20:17:46 »
oltre alla richiesta di password che ho aggiunto è uguale a quello che avevo sulla root principale, non ho cambiato neanche un #

Offline LucaD98

  • Esploratore
  • **
  • Post: 181
  • Sesso: Maschio
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #8 il: 27 Feb 2012, 21:44:28 »
è uguale a questo?
Codice: [Seleziona]
##
# @package        Joomla
# @copyright    Copyright (C) 2005 - 2012 Open Source Matters. All rights reserved.
# @license        GNU General Public License version 2 or later; see LICENSE.txt
##

##
# 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!
#
# 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 something within the component folder,
# or for the site root, or for an extensionless URL, or the
# requested URL ends with one of the listed extensions
RewriteCond %{REQUEST_URI} /component/|(/[^.]*|\.(php|html?|feed|pdf|vcf|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.

Offline marc

  • Esploratore
  • **
  • Post: 184
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #9 il: 27 Feb 2012, 22:26:26 »
si è proprio quello che fa joomla da solo e mette nella root pricipale, dicevo che aggiungendo a questo nella root pricipale il codice del primo post veniva chiesta la password anche dal front end.
incollandone una copia nella cartella administrator con l'aggiunta di password tutto sembra funzionare bene, almeno per ora

Offline LucaD98

  • Esploratore
  • **
  • Post: 181
  • Sesso: Maschio
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #10 il: 28 Feb 2012, 07:26:49 »
sì, dato che hai attivato Riscrivi URL SEF, e le altro opzioni per il rewrite di joomla devi lasciare anche quel codice lì, altrimenti il rewrite non funziona e ti da errore.
Se tutto funziona, puoi mettere risolto.
Ciao

Offline marc

  • Esploratore
  • **
  • Post: 184
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #11 il: 28 Feb 2012, 11:14:19 »
Citazione
hai attivato Riscrivi URL SEF
parli del comando che si da in configurazione globale?

ti chiedo anche un'altra piccola cosa, su questo post ho un problema che per me è molto difficile da risolvere, se ne hai tempo o voglia magari dai una sbirciata, è molto che tento di risolvere ma non ce la faccio

http://forum.joomla.it/index.php/topic,156512.0.html

grazie
« Ultima modifica: 28 Feb 2012, 11:26:58 da marc »

Offline LucaD98

  • Esploratore
  • **
  • Post: 181
  • Sesso: Maschio
    • Mostra profilo
Re:perchè il mio htaccess non funziona bene?
« Risposta #12 il: 28 Feb 2012, 15:14:40 »
si intendo il comando che si attiva nella configurazione globale.
Per l'altro thread appena ho un po' di tempo cerco di analizzare anchio le pagine di kunena, se trovo qualcosa posto lì.
Ciao

 



Web Design Bolzano Kreatif