Htaccess blocca installazione wordpress
-
Salve a tutti,
ho un sito web online fatto (non da me) con Joomla. In una sottocartella "wp", via FTP, ho tentato di installare Wordpress ma quando procedo con l'installazione mi dà errore 403:
"You don't have permission to access /wp/wp-admin/install.php on this server".
Ho controllato i permessi via FTP, mi sembrano giusti (sono 0755 per la cartella wp e 0644 per i file). L'hosting, interpellato, mi dice che è un problema nel file .htaccess della root principale, dove è installato Joomla, ma non mi vuole aiutare oltre.
Il file htaccess l'ho guardato (600 righe...) ma non saprei cosa correggere... ci sono una serie di blocchi ma non so bene quale sia il problema. Qualcuno può aiutarmi? Grazie! -
Dovresti postare il codice del file .htaccess.. Così su due piedi nessuno potrà aiutarti dato che le cause potrebbero essere diverse.
-
Sì, in effetti... qui provo a postare solo il codice che provoca errore 403, 404 e che blocca l'accesso a htaccess e configuration.php
Poi se serve tutto il resto, metto anche quello.
Grazie!########## 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
attemptsto Joomla!If the request query string contains /proc/self/environ
RewriteCond %{QUERY_STRING} proc/self/environ [OR]
Block out any script trying to set a mosConfig value through the URL
(these attacks wouldn't work w/out Joomla! 1.5's Legacy Mode plugin)
RewriteCond %{QUERY_STRING} mosConfig_[a-zA-Z_]{1,21}(=|%3D) [OR]
Block out any script trying to base64_encode or base64_decode data within the URL
RewriteCond %{QUERY_STRING} base64_(en|de)code[^(]([^)]) [OR]
IMPORTANT: If the above line throws an HTTP 500 error, replace it with these 2 lines:
#RewriteCond %{QUERY_STRING} base64_encode(.) [OR]
#RewriteCond %{QUERY_STRING} base64_decode(.) [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
#Block mySQL injects
RewriteCond %{QUERY_STRING} (;|<|>|’|”|)|%0A|%0D|%22|%27|%3C|%3E|%00).*(/*|union|select|insert|cast|set|declare|drop|update|md5|benchmark) [NC,OR]RewriteCond %{QUERY_STRING} ../.. [OR]
RewriteCond %{QUERY_STRING} (localhost|loopback|127.0.0.1) [NC,OR]
RewriteCond %{QUERY_STRING} .[a-z0-9] [NC,OR]
RewriteCond %{QUERY_STRING} (<|>|’|%0A|%0D|%27|%3C|%3E|%00) [NC]Note: The finalRewriteCond must NOT use the [OR] flag.
Return 403 Forbidden error.
RewriteRule .* index.php [F]
########## Block bad user agents
RewriteCond %{HTTP_USER_AGENT} ^BlackWidow [OR]
RewriteCond %{HTTP_USER_AGENT} ^Bot\ mailto:craftbot @ yahoo. com [OR]
RewriteCond %{HTTP_USER_AGENT} ^ChinaClaw [OR]
RewriteCond %{HTTP_USER_AGENT} ^Custo [OR]
RewriteCond %{HTTP_USER_AGENT} ^DISCo [OR]
RewriteCond %{HTTP_USER_AGENT} ^Download\ Demon [OR]
RewriteCond %{HTTP_USER_AGENT} ^eCatch [OR]
RewriteCond %{HTTP_USER_AGENT} ^EirGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailSiphon [OR]
RewriteCond %{HTTP_USER_AGENT} ^EmailWolf [OR]
RewriteCond %{HTTP_USER_AGENT} ^Express\ WebPictures [OR]
RewriteCond %{HTTP_USER_AGENT} ^ExtractorPro [OR]
RewriteCond %{HTTP_USER_AGENT} ^EyeNetIE [OR]
RewriteCond %{HTTP_USER_AGENT} ^FlashGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetRight [OR]
RewriteCond %{HTTP_USER_AGENT} ^GetWeb! [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go!Zilla [OR]
RewriteCond %{HTTP_USER_AGENT} ^Go-Ahead-Got-It [OR]
RewriteCond %{HTTP_USER_AGENT} ^GrabNet [OR]
RewriteCond %{HTTP_USER_AGENT} ^Grafula [OR]
RewriteCond %{HTTP_USER_AGENT} ^HMView [OR]
RewriteCond %{HTTP_USER_AGENT} HTTrack [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Stripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^Image\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} Indy\ Library [NC,OR]
RewriteCond %{HTTP_USER_AGENT} ^InterGET [OR]
RewriteCond %{HTTP_USER_AGENT} ^Internet\ Ninja [OR]
RewriteCond %{HTTP_USER_AGENT} ^JetCar [OR]
RewriteCond %{HTTP_USER_AGENT} ^JOC\ Web\ Spider [OR]
RewriteCond %{HTTP_USER_AGENT} ^larbin [OR]
RewriteCond %{HTTP_USER_AGENT} ^LeechFTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mass\ Downloader [OR]
RewriteCond %{HTTP_USER_AGENT} ^MIDown\ tool [OR]
RewriteCond %{HTTP_USER_AGENT} ^Mister\ PiX [OR]
RewriteCond %{HTTP_USER_AGENT} ^Navroad [OR]
RewriteCond %{HTTP_USER_AGENT} ^NearSite [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetAnts [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^Net\ Vampire [OR]
RewriteCond %{HTTP_USER_AGENT} ^NetZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Octopus [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Explorer [OR]
RewriteCond %{HTTP_USER_AGENT} ^Offline\ Navigator [OR]
RewriteCond %{HTTP_USER_AGENT} ^PageGrabber [OR]
RewriteCond %{HTTP_USER_AGENT} ^Papa\ Foto [OR]
RewriteCond %{HTTP_USER_AGENT} ^pavuk [OR]
RewriteCond %{HTTP_USER_AGENT} ^pcBrowser [OR]
RewriteCond %{HTTP_USER_AGENT} ^RealDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^ReGet [OR]
RewriteCond %{HTTP_USER_AGENT} ^SiteSnagger [OR]
RewriteCond %{HTTP_USER_AGENT} ^SmartDownload [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperBot [OR]
RewriteCond %{HTTP_USER_AGENT} ^SuperHTTP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Surfbot [OR]
RewriteCond %{HTTP_USER_AGENT} ^tAkeOut [OR]
RewriteCond %{HTTP_USER_AGENT} ^Teleport\ Pro [OR]
RewriteCond %{HTTP_USER_AGENT} ^VoidEYE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Image\ Collector [OR]
RewriteCond %{HTTP_USER_AGENT} ^Web\ Sucker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebAuto [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebCopier [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebFetch [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebGo\ IS [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebLeacher [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebReaper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebSauger [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ eXtractor [OR]
RewriteCond %{HTTP_USER_AGENT} ^Website\ Quester [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebStripper [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebWhacker [OR]
RewriteCond %{HTTP_USER_AGENT} ^WebZIP [OR]
RewriteCond %{HTTP_USER_AGENT} ^Widow [OR]
RewriteCond %{HTTP_USER_AGENT} ^WWWOFFLE [OR]
RewriteCond %{HTTP_USER_AGENT} ^Xaldon\ WebSpider [OR]
RewriteCond %{HTTP_USER_AGENT} ^ZeusNote: The finalRewriteCond must NOT use the [OR] flag.
Return 403 Forbidden error.
RewriteRule .* - [F]
Bloccare accesso diretto al core di Joomla!
Deny access to php, xml and ini files
within components and plugins directories
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_URI} .php|.ini|.xml [NC]
RewriteCond %{REQUEST_URI} /components/ [OR]
RewriteCond %{REQUEST_URI} ^/includes/|^/administrator/includes/ [OR]
RewriteCond %{REQUEST_URI} /language/ [OR]
RewriteCond %{REQUEST_URI} /libraries/ [OR]
RewriteCond %{REQUEST_URI} /modules/ [OR]
RewriteCond %{REQUEST_URI} /plugins/ [OR]
RewriteCond %{REQUEST_URI} /templates/ [OR]
RewriteCond %{REQUEST_URI} /xmlrpc/
RewriteRule ^(.*)$ index.php [R=404,L]End - Bloccare accesso diretto al core di Joomla!
Bloccare accesso file .htaccess e configuration.php
<Files .htaccess>
order allow,deny
deny from all
</Files><Files configuration.php>
order allow,deny
deny from all
</Files>End - Bloccare accesso file .htaccess e configuration.php
-
Ciao hikari,
potrebbe dipendere dall'avere bloccato l'accesso diretto al file php:RewriteCond %{REQUEST_FILENAME} -f RewriteCond %{REQUEST_URI} \.php|\.ini|\.xml [NC]... anche se dovrebbe dare un 404 e non un 403. Sono tutte qui le istruzioni htaccess?
-
-
Secondo me sono tutte inutili queste regole .htaccess, 600 sono esagerate veramente.
Io avrei tolto tutto e me ne sarei fatto uno io e sarei arrivato al massimo a 50 righe.
-
...niente da fare. Ho provato a togliere dall' htaccess il codice indicatomi da FDA ma mi nega ancora il permesso di accedere al file install.php.
A questo punto, dovrei cambiare del tutto il file htaccess, come mi consiglia MiWebDesign e metterne uno semplificato.
Tenendo conto che:- Il sito è fatto (non da me...) in Joomla 1.5.26 (orrore orrore)
- E' attiva la riscrittura delle url
- L'aspetto sicurezza non mi interessa perché tra poco il sito sarà completamente cambiato
Sareste così gentili da indicarmi dove potrei trovare un testo per htaccess idoneo?
Grazie!
-
Puoi fare test commentando gruppi di istruzioni oppure scaricare il file htaccess da un'installazione nuova (per Joomla guarda qui: joomla.it/download/joomla-15.html).
-
Ciao! Sembra che tu sia interessato a questa conversazione, ma non hai ancora un account.
Stanco di dover scorrere gli stessi post a ogni visita? Quando registri un account, tornerai sempre esattamente dove eri rimasto e potrai scegliere di essere avvisato delle nuove risposte (tramite email o notifica push). Potrai anche salvare segnalibri e votare i post per mostrare il tuo apprezzamento agli altri membri della comunità.
Con il tuo contributo, questo post potrebbe essere ancora migliore 💗
Registrati Accedi