0

Everyone peoples can easily acess to my wp-includes how can i hide or not visible files to users can anybody help me regarding it this is my wordpress website link see everybody can see this https://pifserver.ml/wp-includes

1 Answer 1

0

Considering you got an Apache server, use this full code in the .htaccess file:

# Block the include-only files.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^wp-admin/includes/ - [F,L]
RewriteRule !^wp-includes/ - [S=3]
RewriteRule ^wp-includes/[^/]+\.php$ - [F,L]
RewriteRule ^wp-includes/js/tinymce/langs/.+\.php - [F,L]
RewriteRule ^wp-includes/theme-compat/ - [F,L]
</IfModule>
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress

As a bonus, I would also add this:

<IfModule mod_autoindex.c>
    Options -Indexes
</IfModule>
14
  • bro can u resolve thats my .htaccess file please look into it and just say how should i put in this to resolve issue ibb.co/QKC2YJg
    – Forums Pif
    Commented Feb 7, 2019 at 10:10
  • Just put the code before or after what you already have. Commented Feb 7, 2019 at 13:26
  • i did this bro but its showing me 500 error after that
    – Forums Pif
    Commented Feb 7, 2019 at 19:15
  • 1
    i can send u my server ftp details if u wanna check
    – Forums Pif
    Commented Feb 7, 2019 at 19:17
  • Use this form: goo.gl/forms/p29R3T26HeFKxKu23 Commented Feb 7, 2019 at 20:01

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.