Još jedan od načina kako da zaštitite sajt je onemogućavanje izvršenja PHP fajlova u određenim direktorijumima u kojima to i nije neophodno kao što je /wp-content/uploads/.
Ovako ćemo sprečiti hakera da pokrene zlonamerni softver čak i ako uspe da ga ubaci na sajt.
Ovo ćemo postići korišćenjem .htaccess fajla. To je fajl koji ima većina sajtova i služi za zaštitu admin dela i sl.. Ali može da se i iskoristi za zaštitu svakog direktorijuma.
Da biste ovo postigli morate da napravite fajl sa tekstom:
<Files *.php>
deny from all
</Files>
u tekst editoru na računaru i podignete ga na server uz pomoć FTP klijenta ili cpanela.
Ovaj fajl upload-ujte u foldere /wp-includes/ i wp-content/uploads
PORT 22 Mihailo Đorđević PR
MB:65790777
PIB:111988991
170-0050037171002-92
PORT 22 Mihailo Đorđević PR
MB:65790777
PIB:111988991
170-0050037171002-92
Cookie | Duration | Description |
---|---|---|
cookielawinfo-checkbox-analytics | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics". |
cookielawinfo-checkbox-functional | 11 months | The cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional". |
cookielawinfo-checkbox-necessary | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary". |
cookielawinfo-checkbox-others | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other. |
cookielawinfo-checkbox-performance | 11 months | This cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance". |
viewed_cookie_policy | 11 months | The cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data. |